So I've been trying to get to grips with MATLAB GUIs and looked at:
But when I try to run this code, I get the following errors:
Error using movegui (line 99)
unrecognized input argument
Error in simple_gui2 (line 52)
movegui(f,'center')
I can't see what's wrong with how movegui is being used.

 採用された回答

Geoff Hayes
Geoff Hayes 2014 年 11 月 15 日

0 投票

David - which version of MATLAB are you using?
The code that you are trying to use (from the given link) was developed with MATLAB R2014b. If I try to run the same code on R2014a, I see the same error as you. This is because of how handles to figures are now managed in R2014b. Rather than being a graphics handle (resembling a double like 172.343434) it appears to be more like a structure/object with properties.
If you want to find something similar for your version of MATLAB, then go to archived MATLAB documentation, choose the appropriate version, and search for whatever it is you are interested in. For example, a similar simple GUI for R2014a can be found at R2014a - creating a simple programmatic GUI .

1 件のコメント

David
David 2014 年 11 月 15 日
I am using R2013a and just looked up the documentation for this version which is giving me code that works. Thanks!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で App Building についてさらに検索

タグ

質問済み:

2014 年 11 月 15 日

コメント済み:

2014 年 11 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by