Error using save Unable to write file datafiles/f01.mat: No such file or directory.
Ältere Kommentare anzeigen
keep getting this error for simple save function. heres my code
if (jrandflag == 1) o = jrand.createShiftVector(D, lb, ub); o = o'; save('datafiles/f01.mat', 'o'); else load('datafiles/f01.mat'); o = o(1:D); end
datafiles folder does exist in same directory; expect'd save function to create f01.mat but error every time. and code not in loop per se
Can anyone help please? Thanks
Matlab version 7.10.0.499 (R2010a) on windows platform
Akzeptierte Antwort
Weitere Antworten (1)
Bart Van Hove
am 12 Jan. 2018
2 Stimmen
When my MATLAB (2014b) has been running for a while (days), sometimes the current folder disappears from the path (have not verified if this is exactly what happens). Running scripts, functions, loading files... continues to work, but saving to subdir/file.mat does not. Moving up 1 directory in the MATLAB file browser and re-entering the current folder resolves the issue for me. Saving with a full path as suggested by Jiang avoids this issue, but I'm still curious why it occurs.
2 Kommentare
Alessio
am 31 Jul. 2018
I experienced the same issue with R2014b, and the workaround is the same. I'm curious if they fixed it on next versions.
Henry Brice
am 26 Mai 2023
I can confidently say that in 2023, with version R2023a, this is still a problem!
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!