Loading and using a .MAT file

조회 수: 1 (최근 30일)
William
William 2011년 6월 15일
I am having a great deal of trouble saving a .MAT file to a destination on our D drive at the end of one function and retiriving it and loading its contents into the workspace at the start of another function. I am using
save D:\Temp_folder;
then at the beginning ....
load D:\Temp_folder
Do i need to use an append function?
Thank you for your help

채택된 답변

Paulo Silva
Paulo Silva 2011년 6월 15일
Try like this:
save('D:\Temp_folder\MyVars')
load('D:\Temp_folder\MyVars')
Also you can use the save function with appended strings like this
save(['D:\Temp_folder\') 'MyVars'])

추가 답변 (2개)

Gerd
Gerd 2011년 6월 15일
Hi William,
you have to use
% to save a file called "filename" in the folder "D:\Temp_folder"
save('D:\Temp_folder\filename');
% now you find the file with all variables from the workspace
The load command is just the other way around.
Gerd

SIIT
SIIT 2011년 9월 11일
Hi, I have problem of execute m file by using data in mat file. I have save my data in mat file as matrix form with specific name.
when I write my m file. why I can't use that data mat file in my m file?
Please help...
Thanks in advance!!!
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 9월 11일
Please start a new topic for this matter.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by