Error using save. Unable to write file
显示 更早的评论
I randomly got the error descripted in the title. Suddenly Matlab had errors using my field structure. I have a code like
In.C=c;
In.D=d;
Par.E=e;
Par.F=f;
In=orderfields(In);
save('filename.mat','In','Par')
Out.A=a;
Out.B=b;
Out=orderfields(Out);
save('filename.mat','-append','Out')
and I get an error for the last line here. I have a similar program that I didnt touch and worked perfectly fine before, just as this ine, now it gives the same error too.
I already tried saving in v7.3 and I also restarted Matlab and amso the PC, nothing worked.
If it helps, before that I had trouble with Parallel Computing Toolbox, which shutted down after each iteration and restarted again.
I also reinstalled Matlab, same problem. And inbetween I had also some trouble starting Matlab saying I dont have a valid license file, but then suddenly it worked again and I could run the code once or twice before the same error occured again. But I should have a valid license, Matlab profile doesnt say anything.
Does somebody know whats wrong?
7 个评论
Dyuman Joshi
2024-3-27
Is that full error message you received? If not, then share the full error message i.e. all of the red text.
Does the error occur while saving any data or just this particular data only? If it occurs for this particular data only, please share the data so we can reproduce the error and provide suggestionsa accordingly.
Dennis Derewjanko
2024-3-27
Dyuman Joshi
2024-3-27
Dennis Derewjanko
2024-3-27
Damian Pietrus
2024-3-27
Are you encountering this error within a parfor loop for just in regular serial code?
Dennis Derewjanko
2024-3-27
编辑:Dennis Derewjanko
2024-3-27
Walter Roberson
2024-3-27
I recommend against using uiimport() . uiimport() is guessing that your .mat file is a text file, and then is failing to load the binary .mat file as text.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!