Error using save. Unable to write file
Mostrar comentarios más antiguos
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 comentarios
Dyuman Joshi
el 27 de Mzo. de 2024
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
el 27 de Mzo. de 2024
Dyuman Joshi
el 27 de Mzo. de 2024
Dennis Derewjanko
el 27 de Mzo. de 2024
Damian Pietrus
el 27 de Mzo. de 2024
Are you encountering this error within a parfor loop for just in regular serial code?
Dennis Derewjanko
el 27 de Mzo. de 2024
Editada: Dennis Derewjanko
el 27 de Mzo. de 2024
Walter Roberson
el 27 de Mzo. de 2024
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.
Respuestas (0)
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!