フィルターのクリア

gui error: Struct contents reference from a non-struct array object

1 回表示 (過去 30 日間)
Ria3242
Ria3242 2016 年 9 月 28 日
コメント済み: Praveer Jain 2021 年 1 月 13 日
I have a drop down list in my GUI. it consists of 5 axes, from which one main axes displays my selected image. I want to select the image from the drop list and it should be displayed in the first axes for further processing. At first when I was working on my GUI, this worked. But don't know how come this error appeared just when I run my GUI now.
the error is just on this very first statement of the callback:
axes(handles.axes1);
Error:
Struct contents reference from a non-struct array object.
I can't figure out my mistake. Help needed.

採用された回答

Geoff Hayes
Geoff Hayes 2016 年 9 月 28 日
Ria3242 - typically, this type of error is due to the GUI not being launched correctly. If you launch the GUI using the fig file, then the variables (such as handles) will not be initialized correctly and you will see this error.
GUIDE-created GUIs can only be launched through the GUIDE editor (press the RUN button), the MATLAB file editor (again, press the RUN button), or by calling the GUI name from the command line. For example, if you have the MyGUI.m and MyGUI.fig files, you would do
>> MyGUI
to launch the GUI.
  2 件のコメント
Ria3242
Ria3242 2016 年 9 月 29 日
Ok Sir I surely got it. I am opening my GUI just like you said. Thank you again. It works!
Praveer Jain
Praveer Jain 2021 年 1 月 13 日
Thanks a lot Geoff...

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

その他の回答 (1 件)

Ankit
Ankit 2019 年 4 月 11 日
This solution is working very perfect.
Thanks a lot
I appriciate your answer.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by