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

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일

0 개 추천

Once you loaded,
S=data;
clear data;

추가 답변 (1개)

Daniel Shub
Daniel Shub 2011년 9월 30일

0 개 추천

Even better would be
temp=load('file_name');
S = temp.data;
clear temp;

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

질문:

Ken
2011년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by