cant open .fig anymore

9 ビュー (過去 30 日間)
mohammad ibrahim
mohammad ibrahim 2021 年 3 月 29 日
編集済み: Jan 2021 年 3 月 31 日
My GUI ".fig" was working very fine, but suddenly I have an error and I cannot open the .fig using GUIDE anymore.
can anybody help me solve this please ?
" here is the Error message"==========
Dot indexing is not supported for variables of this type.
Error in matlab.graphics.internal.figfile.FigFile/read (line 59)
result = hgDataVars.(vars_hgM{1}).GraphicsObjects.Format3Data;
Error in matlab.graphics.internal.figfile.FigFile
Error in loadFigure (line 31)
FF = matlab.graphics.internal.figfile.FigFile(fullpath);
Error in openfig>localOpenFigure (line 69)
h = loadFigure(filename, visibleAction);
Error in openfig (line 40)
figOut = localOpenFigure(filename, reuse, visibleAction);"
thank you
MI
  3 件のコメント
mohammad ibrahim
mohammad ibrahim 2021 年 3 月 31 日
yes that is exactly what happened.
mohammad ibrahim
mohammad ibrahim 2021 年 3 月 31 日
I was obliged to return to a backuped file to be able to reopen the figure file

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

採用された回答

Jan
Jan 2021 年 3 月 29 日
Use the debugger to find the reason of the problem. Type this in the command window:
dbstop if error
Then run the code again. When Matlab stops, check the types of the variables:
hgDataVars
hgDataVars.(vars_hgM{1})
hgDataVars.(vars_hgM{1}).GraphicsObjects
hgDataVars.(vars_hgM{1}).GraphicsObjects.Format3Data;
  2 件のコメント
mohammad ibrahim
mohammad ibrahim 2021 年 3 月 29 日
編集済み: mohammad ibrahim 2021 年 3 月 29 日
thank you for your answer
actually the problem comes from here
hgDataVars.(vars_hgM{1}).GraphicsObjects
ans = [ ]
this GraphicsObjects should be the figure
Jan
Jan 2021 年 3 月 30 日
編集済み: Jan 2021 年 3 月 31 日
Okay. Now you know, where to search for the problem. Open the soure in the editor and search, where GraphicsObjects is set to the empty matrix.

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

その他の回答 (1 件)

cr
cr 2021 年 3 月 29 日
Try clearing your workspace and then launching the GUI. Looks like you have a variable with the same name as the GUI.
  1 件のコメント
mohammad ibrahim
mohammad ibrahim 2021 年 3 月 29 日
I did but the same error appears

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

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by