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.

 Akzeptierte Antwort

Geoff Hayes
Geoff Hayes am 15 Nov. 2014

0 Stimmen

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 Kommentar

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 15 Nov. 2014

Kommentiert:

am 15 Nov. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by