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

I'd like to, well load a file from my desktop to my workspace. Is there an ideal way to do this?

Risposte (2)

load('full/path/to/file', 'variable1', 'variable2');

1 Commento

I assumed you wanted to load variables from this MATLAB-specific file. Were you looking to load some other file (image, etc)?

Accedi per commentare.

Gurpreet Singh
Gurpreet Singh il 30 Giu 2020
Modificato: Gurpreet Singh il 30 Giu 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');

Categorie

Richiesto:

il 30 Giu 2020

Modificato:

il 30 Giu 2020

Community Treasure Hunt

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

Start Hunting!

Translated by