loading a dataset (S=load('file_name'), how?

5 次查看(过去 30 天)
I have a 512*513 matlab dataset, saved as "file_name.mat". If I use load('file_name'), I can have the dataset loaded as 'data'. But I want it to be named as "S", and tried to use S=load('file_name'), but "S" has the structure informations only.
How can I load 'file_name' in 'S'? thanks!

采纳的回答

Fangjun Jiang
Fangjun Jiang 2011-9-30
Once you loaded,
S=data;
clear data;

更多回答(1 个)

Daniel Shub
Daniel Shub 2011-9-30
Even better would be
temp=load('file_name');
S = temp.data;
clear temp;

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by