save function does not work

When it try to use the save function it returns this error :
>> vars = 1;
>> save('vars')
Error using save
Unable to write file vars: too many files open.
my computer starts beeping like crazy and it goes on for several mutes (with a first phase of matlab error-like beepings, then with a different beep sound). all the function and scripts work. I tried to save my files both manually, right clicking on the variables, or using the save function (see example above). However, the variables appear in my current folder, but they cannot be opened. if i try to open one of them, this is what i get:
Error using load
Unable to read file
*directory and file name* Too many
files open.
there are no other files open (visibly at least).
i tried:
fclose('all')
ans = 0
but still i cannot use the save function.
also :
>> close all
Too many open files. Close files to prevent MATLAB instability.
Caused by:
Message Catalog MATLAB:services was not loaded from the file.
Please check file location, format or contents
does not close all the figures (n = 6) open.

3 Kommentare

madhan ravi
madhan ravi am 10 Apr. 2021
Bearbeitet: madhan ravi am 10 Apr. 2021
which save -all % what shows up?
Eleonora Bano
Eleonora Bano am 26 Mai 2021
>> which save -all
built-in (C:\Program Files\MATLAB\R2017b\toolbox\matlab\general\save)
save is a Java method % com.mathworks.services.Prefs method
C:\Program Files\MATLAB\R2017b\toolbox\matlab\codetools\+matlab\+desktop\+editor\@Document\Document.m % matlab.desktop.editor.Document method
save is a Java method % com.mathworks.mde.editor.MatlabEditor method
save is a Java method % com.mathworks.matlab.api.editor.Editor method
C:\Program Files\MATLAB\R2017b\toolbox\matlab\winfun\@COM\save.m % COM method
C:\Program Files\MATLAB\R2017b\toolbox\simulink\simulink\@slxPackager\save.p % slxPackager method
C:\Program Files\MATLAB\R2017b\toolbox\sl3d\sl3d\@vrworld\save.m % vrworld method
Eleonora Bano
Eleonora Bano am 26 Mai 2021
i ended up doing this
save('vars','-v7.3')

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2017b

Tags

Gefragt:

am 10 Apr. 2021

Kommentiert:

am 26 Mai 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by