Unable to exportgraphics or saveas: The value of 'destination' is invalid.
33 ビュー (過去 30 日間)
古いコメントを表示
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:
a=[1:10]
b=[11:20]
plot(a,b)
saveas(gcf,'ab.fig')
exportgraphics(gcf,'ab.png','Resolution',600)
Saveas error:
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)
FF.write();
Error in saveasfig (line 6)
savefig(h, name);
Error in saveas (line 153)
feval( ['saveas' format], h, name )
Error in untitled2 (line 4)
saveas(gcf,'ab.fig')
Exportgraphics error:
Error using exportgraphics
The value of 'destination' is invalid. Unable to create output file 'ab.png', No such file or
directory.
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!
8 件のコメント
Stephen23
2023 年 4 月 11 日
編集済み: Stephen23
2023 年 4 月 11 日
"how can I check my permissons ;?"
Check with your OS for that location. For example:
https://support.apple.com/guide/mac-help/change-permissions-for-files-folders-or-disks-mchlp1203/mac
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!