Register to reply 
How to write an interactive GUI in MATLAB 
Share this thread: 
#1
Oct510, 05:12 AM

P: 22

I'm supposed to write a matlab code where it calculates kinematics of a robot arm and plots it. But the plot is required to have a way of user entering different values and be able to change position of the robot. I think i can handle the kinematics behind it but i have no idea how to make an interactive gui like that in matlab. Basically i want to code something like this but mine is going to be much more simple of course. Can someone recommend me some reading on this subject so i can figure this out ?
Thanks in advance 


#2
Oct510, 09:08 AM

P: 241

Hai to start with type "guide" in matlab command prompt. It will take you to creating new GUI that suits your application.
You have to read "Creating GUI" in Matlab help first before proceeding ! 


#3
Oct1010, 06:02 AM

P: 22

thanks that was quite useful



#4
Oct1410, 06:52 AM

P: 145

How to write an interactive GUI in MATLAB
To give you a mini lesson on the way matlab handles figures (gui objects):
MATLAB deals with all graphics objects as Handles. If you dont know what that is, a Handle is a reference to a set of data. In the case of graphics objects in MATLAB, these handles are all simply double precision numbers. To access or set any properties of any graphics, you have to use the get()/set() command, along with the handle to the graphics object you are referencing. There are 3 "levels" of graphics objects in MATLAB: Figure  the highest level. It is the window that any graphics objects you create go in. eg:
Axes  The second level is the "child" of the figure, the axes. each axes is ALWAYS created in a figure (Matlab will create one if you create an axes without specifying a figure). The Axes is the "place" for plots, text, labels, and any other graphics object in MATLAB.
One thing to notice is the "parent" and "child" fields in axes/figures. In the code above, you created an axes in a figure. Now, if you run
Graphics objectsThe last level of graphics objects are the actual graphics objects  plots, text, etc. Again, if you create a plot:
Ive bored you enough with this stuff  it really is the most annoying part of matlab imo, but jsut remember you use get() and set for everything. jsut realized I havent used set to set anything, heres a simple way to resize the figure f:
if makign an interactive GUI wuy will also need to look into callback functions, as they are important to any gui. hope this essay didnt confuse you more 


Register to reply 
Related Discussions  
How to write this equation within Matlab?  Math & Science Software  8  
How to write these formulas in Matlab?  Engineering, Comp Sci, & Technology Homework  4  
Write a working matlab function  Calculus & Beyond Homework  1  
Write equation in matlab  Math & Science Software  1  
How to write this equation in matlab  Math & Science Software  0 