save function does not work

14 views (last 30 days)
Eleonora Bano
Eleonora Bano on 10 Apr 2021
Commented: Eleonora Bano on 26 May 2021
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 Comments
Eleonora Bano
Eleonora Bano on 26 May 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 on 26 May 2021
i ended up doing this
save('vars','-v7.3')

Sign in to comment.

Answers (0)

Categories

Find more on Entering Commands in Help Center and File Exchange

Tags

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!