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

45 次查看(过去 30 天)
I'd like to, well load a file from my desktop to my workspace. Is there an ideal way to do this?

回答(2 个)

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

请先登录,再进行评论。


Gurpreet Singh
Gurpreet Singh 2020-6-30
编辑:Gurpreet Singh 2020-6-30
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');

类别

Help CenterFile Exchange 中查找有关 Files and Folders 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by