Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: GUI script/function issue
Replies: 2   Last Post: Apr 26, 2013 9:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,945
Registered: 12/7/04
Re: GUI script/function issue
Posted: Apr 26, 2013 9:19 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Krsto Sbutega" <ksbutega@hotmail.com> wrote in message
> Hello everyone,
> I am having some problems with the creation of a GUI. I am relatively new
> to GUI so I am having a problem that I cannot figure out. Here it is.
> I created a GUI in which you input some parameters and when you press next
> it stores them and moves to the next window. It all worked fine when I had
> it in my script, but now I am trying to make my code modular and I want to
> have the GUI as a separate function. However, when I move it to a
> function, I get an error because my handle numbers for some reason are not
> passed to the callback function when the user presses next. I am not sure
> what the issue is and I don't know how to resolve it. A little sample code
> is given here:

Walter already answered this over on MATLAB Answers:


but I'd like to chime in with one point. While specifying callbacks as
strings is _allowed_ (for backwards compatibility with pre-function handle
releases, I believe) I encourage you NOT to specify them as strings unless
the callback is something extremely simple, like a DISP statement. Specify
them as a function handle (which could be an anonymous function) instead.


Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.