Error in append dot structure mat file

조회 수: 2 (최근 30일)
balandong
balandong 2017년 5월 3일
댓글: Walter Roberson 2017년 5월 3일
Dear all, I have data store in a mat file (i.e.,subject01_dataset.mat) . Under the mat file, each data were store 1) Patient_FullData.auxilaryData 2) Patient_FullData.reshape
After some processing, I want to store the result as Patient_FullData.result Thus the following line were utilized
save ('SC4001E0_dataset.mat', 'Patient_FullData.result', '-append');
However, I got the following error
'Patient_FullData.data' is not a valid variable name.
May I know how to mitigate this issue

채택된 답변

Walter Roberson
Walter Roberson 2017년 5월 3일
You cannot save() a field in a structure, and you cannot use save() to appened to an existing struture.
If you need to appened on to an existing array in a .mat file, consider using matFile()
  댓글 수: 2
balandong
balandong 2017년 5월 3일
Thanks for the info. In fact, by using this line, MATLAB does not load any data from the MAT into memory but which is memory efficient. Thanks
Walter Roberson
Walter Roberson 2017년 5월 3일
matFile() is the defined way to append to an existing variable in a .mat file.

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

추가 답변 (0개)

카테고리

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