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.

 Accepted Answer

Geoff Hayes
Geoff Hayes on 15 Nov 2014
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 Comment

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

Sign in to comment.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Tags

Asked:

on 15 Nov 2014

Commented:

on 15 Nov 2014

Community Treasure Hunt

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

Start Hunting!