Hi,
I can't remember when it happened as I let the problem slip away but I'm not able to open any ".fig" file that I save with matlab.
The problem is not going away by updating matlab.
When I save a .fig file, the file is created but when I try to open it then I get this message:
"Error using load
Unable to read MAT-file /Users/xxxx/Desktop/Desktop_save/YOTC/figure/untitled.fig.
Not a binary MAT-file. Try load -ASCII to read as text."
The older figures I have saved before the issue occured can still be openned. My computer is running on MacOS 10.14.5 and my matlab version is R2019a update 1.
I've been looking online for quite sometimes without finding any solution, so any help would be more than welcomed!
Thanks,
Greg

3 件のコメント

Walter Roberson
Walter Roberson 2019 年 8 月 31 日
What steps are you taking to save the .fig files ?
Can you attach one of the files that is detected as being wrong?
Star Strider
Star Strider 2019 年 8 月 31 日
gregory cesana’s Answer (and ‘test.fig’) moved here —
Whether I use the command saveas or the gui menu to save the figure gives the same results. Then I double click on the .fig file or I use the command open/openfig and the error message pops up.
Note that it uses to work in the past and it suddently stopped working.
I enclosed a simple plot saved with the gui menu.
Star Strider
Star Strider 2019 年 8 月 31 日
I get the same result (error message) with ‘test.fig’ as you posted originally.
Wild guess:
What do you get when you run:
q1 = which('saveas.m','-all')
q2 = which('savefig.m','-all')
I get only:
q1 =
{'C:\Program Files\MATLAB\R2019a\toolbox\matlab\general\saveas.m'}
q2 =
{'C:\Program Files\MATLAB\R2019a\toolbox\matlab\graphics\savefig.m'}

サインインしてコメントする。

 採用された回答

Star Strider
Star Strider 2019 年 8 月 31 日

2 投票

I get the same result (error message) with ‘test.fig’ as you posted originally.
Wild guess:
What do you get when you run:
q1 = which('saveas.m','-all')
q2 = which('savefig.m','-all')
I get only:
q1 =
{'C:\Program Files\MATLAB\R2019a\toolbox\matlab\general\saveas.m'}
q2 =
{'C:\Program Files\MATLAB\R2019a\toolbox\matlab\graphics\savefig.m'}

3 件のコメント

Stephen23
Stephen23 2019 年 8 月 31 日
gregory cesana's "Answer" moved here:
{'/Users/xxxx/Documents/MATLAB/savefig.m' }
{'/Applications/MATLAB_R2019a.app/toolbox/matlab/graphics/savefig.m'}
Mannnn!!!!
Well done!
I was actually using an old routine of savefig from 2013 when –I guess– savefig was not implemented directly in matlab. This routine may be outdated and no longer compatible with the newer matlab versions, hence my problem...
I just removed it and now everything works just fine!
Thank you so much!!!
Greg
Star Strider
Star Strider 2019 年 8 月 31 日
編集済み: Star Strider 2019 年 8 月 31 日
@gregory cesana —
My pleasure!
@Stephen —
Thank you!
Star Strider
Star Strider 2019 年 8 月 31 日
@gregory cesana —
If my Answer helped you solve your problem, please Accept it!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePrinting and Saving についてさらに検索

製品

リリース

R2019a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by