Unable to exportgraphics or saveas: The value of 'destination' is invalid.
45 views (last 30 days)
Hello matlab community,
I am trying to save my figures both in fig and png format. I was using these commands before without any problem but I started to get these errors:
Here is an example script I used to try:
Error using save
Unable to write file ab.fig: No such file or directory.
Error in matlab.graphics.internal.figfile.FigFile/write (line 32)
save(obj.Path, obj.MatVersion, '-struct', 'SaveVars');
Error in savefig (line 83)
Error in saveasfig (line 6)
Error in saveas (line 153)
feval( ['saveas' format], h, name )
Error in untitled2 (line 4)
Error using exportgraphics
The value of 'destination' is invalid. Unable to create output file 'ab.png', No such file or
Previously I had problem using xline and I was using 'restoredefaultpath rehash toolboxcache' to fix it.
Would it be connected to each other somehow? How can I fix this problem?
Thank you for your time!