help using Save and load function
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello I would like to save a variable into a .dat file using the command window but my save function is now working. I have followed the example from my tutorial book but they are not working.
I would like to save the file and then load it again from the command window. I am currently using R2010a.
all assistance is greatly appreciated thank you
답변 (1개)
Max Müller
2014년 8월 20일
편집: Max Müller
2014년 8월 20일
I had this Problem once before (i guess). Try to save ur Variable in a .mat file and then load it again. Just try it. Loading form a .dat file is somehow complicated.
X = 1
save('Test.mat','X') % save into the file: Test.mat
clear % deletes all the Variables it the Workspace
load('Test.mat','X') % gives back ur Variable X
댓글 수: 5
참고 항목
카테고리
Help Center 및 File 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!