How do I load a file from my desktop to my workspace?

54 vues (au cours des 30 derniers jours)
Victoria Helm
Victoria Helm le 30 Juin 2020
Modifié(e) : Gurpreet Singh le 30 Juin 2020
I'd like to, well load a file from my desktop to my workspace. Is there an ideal way to do this?

Réponses (2)

Reeshabh Kumar Ranjan
Reeshabh Kumar Ranjan le 30 Juin 2020
load('full/path/to/file', 'variable1', 'variable2');
  1 commentaire
Reeshabh Kumar Ranjan
Reeshabh Kumar Ranjan le 30 Juin 2020
I assumed you wanted to load variables from this MATLAB-specific file. Were you looking to load some other file (image, etc)?

Connectez-vous pour commenter.


Gurpreet Singh
Gurpreet Singh le 30 Juin 2020
Modifié(e) : Gurpreet Singh le 30 Juin 2020
Hi Victoria,
The following command might help you.
load('full path to file\file_name.mat');
For example, I used below command to load a file "test_data.mat" from my desktop to my MATLAB workspace.
load('C:\Users\singh\OneDrive\Pictures\test_data.mat');

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by