load a Mat file previously saved by Matlab itself : not a binary MAT-file

조회 수: 62 (최근 30일)
Conrado Neto
Conrado Neto 2020년 9월 5일
댓글: ali Turan 2022년 3월 31일
I am using Matlab 2019b on 3 different computers.
on all of them, when I save a MAT-file using Matlab itself and then try to load it, it gives the message:
"Unable to read MAT-file LHS_Samples.mat not a binary MAT-file."
I saved using the command:
save('LHS_Samples');
to save all the variables in the workspace. The variables in the workspace are only arrays and the largest is a 500x10 matrix.
and then I loaded them using:
load('LHS_Samples');
I went to General > Preferences > MAT-files
and tried to choose different Versions to see whether it would change anything, but no luck
I also tried saving the MAT-file as version 4 and then 6: save('LHS_Samples','-v4');
sill, the error persists.
Why can't Matlab load a MAT-file that it created itself? This doesn't make any sense.
any help is appreciated, thanks!

답변 (1개)

Conrado Neto
Conrado Neto 2020년 9월 5일
I just figured it out.
In case anyone run into this problem, my problem was that I am using OneDrive and I did not set the option to "Always Keep on this Device" on, for the folder that Matlab was saving the Mat-files
alternativelly, you can deselect the option: "save space and download files as you use them", that is on Settings > Setting Tab > Files On-Demand.
  댓글 수: 2
ali Turan
ali Turan 2022년 3월 31일
I have same problem but I can't find where "Settings > Setting Tab > Files On-Demand" is.
ali Turan
ali Turan 2022년 3월 31일
I am sorry. I misunderstood. I supposed "Settings > Setting Tab > Files On-Demand" is on Matlab.

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

카테고리

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