Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Doug’s Pick of the Week

April 17th, 2008

Advanced MATLAB: Handles and other inputs to GUIDE callbacks

There are three inputs to every automatically generated callback from GUIDE:

function edit1_Callback(hObject, eventdata, handles)

A common question that I am asked is “What is the handles structure?” This four minute video will show a simple GUI where you edit some text, and press a button that will copy that text into a third uicontrol. This is all done using the handles structure. The other two inputs: hObject and eventdata will be briefly discussed also.


Video Content

iconFiles.jpgiconPod.jpg

9 Responses to “Advanced MATLAB: Handles and other inputs to GUIDE callbacks”

  1. Quan replied on :

    Nice video as usual. You need a nickname of some sorts . . . I was thinking “The MATLAB Evangelist” might a good one.

    But seriously, good videos. I want to start linking them from blinkdagger because I think the tutorials supplement each other very well.

  2. naor replied on :

    Doug,
    Can you explain about guidata(hObject,handles)? I thought this was necessary after any change to handles.
    Thanks

  3. Doug replied on :

    Quan,

    We actually had “MATLAB Evangelist” as a title for while when Scott was looking for people. Looks like we took that out of the title, but there are plenty of jobs like that for MATLAB geeks.

    http://www.mathworks.com/company/jobs/opportunities/ApplicationEngineering.html

    Send me a resume, we will see what we can do.

    Doug

  4. Doug replied on :

    Naor,

    About GUIDATA: That is a a different way of interacting with handles. I prefer handles to be more of a read-only type of structure. If I want to store data, then I advocate SETAPPDATA. See my video on this:

    http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8616&objectType=FILE

    Doug

  5. jiro replied on :

    Quan,

    There’s actually 6 of us at The MathWorks with an internal title of “LTC Evangelist” (LTC = Language of Technical Computing = MATLAB). I am one of them, and Doug used to be in this group as well.

  6. amiryousuf replied on :

    Hello, Can we output data entered by user in dialogbox to command window?
    thanks in advance.

  7. Administrator replied on :

    Amir,

    You would simply modify the callback to use the DISP command to display any data you want.

    Doug

  8. amiryousuf replied on :

    thanks for the idea. it is working.

  9. Tayfun replied on :

    ıt is very good video. I learn a lot of new things about gui

Leave a Reply


Doug Hull is an Application Engineer at The MathWorks. A MATLAB user since 1994, he gets paid to live, eat, and breathe MATLAB! This blog is dedicated to promoting the File Exchange by highlighting files and original video content.



  • pierre: Hi sherryl and thank you for answering me, Actually, I already tried before to use this property because I...
  • Sherryl: In Response to Post #10 by Bryan - Hi Bryan, By default the analog input object will acquire one second...
  • Sherryl: Hello Pierre, Please look at the OutOfDataMode property. http://www.mathworks .com/access/helpd...
  • Scott Hirsch: Elya - In v7.0, try aviread. This has straightforward syntax for reading a single frame - you could...
  • Scott Hirsch: Eric - That’s a nice suggestion. I often get frustrated when debugging GUIDE guis and ending up...
  • pierre: Hi all, I have the Data Acquisition Toolbox, and I’m trying for 2 weeks to send a step voltage, and...
  • Eric S: It would be great to stop the debugger from coughing somewhere inside the more “internal̶ 1;...
  • Tareq: coef1 = rand(1,3)-0.5; coef2 = rand(1,3)-0.5; lex1=roots(polyder(c oef1)) lex2=roots(polyder(c oef2)) hold all...
  • Luca Balbi: While we’re at it… Checking for a number to be zero is tricky in itself. We’re better...
  • david: perhaps some error checking is in order. After all, it is possible that our randomly generated quadratic...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.

Related Topics