MATLAB GUI

This is a brief note of the programming on MATLAB GUI.

As part of a DSP project, the programming of GUI was on my duty in my third year studying in USTC. To offer some tips for novices, I composed this short passage about GUI programming.

Firstly, the GUI coding seems to be much easier in MATLAB since we can simply draw the graph of buttons rather than writing all the properties of the objects by ourselves. To begin your journey in the GUI programming, you can simply click on “new”-“GUI”. Secondly, the rudimentary of MATLAB GUI includes the term handle, especially the handle of figures. But don’t worry if you can’t catch the precise meaning of it, after some practice you may have the sufficient understanding of GUI to solve some simple problems in your everyday study, just the same as I am right now. Thirdly, let us talk about the most essential part of GUI coding. That is the communication between objects in a GUI window and between two GUI windows (which can easily extend to the data sharing among more windows). I know that you may have some books right in your hands and may have already know that there are at least seven methods to accomplish the interaction between different windows. What I am going to say are the exact methods I used, which I think might be the easiest method. With respect to the interaction between objects in the same window, you can use a struct in your function named “openfcn”. Since the functions below will share the struct (which can be easily understood by the input of the functions of the buttons), we can simply use the struct to deposit and withdraw our data. Then, as for the data communication between GUI windows, use the function “findall”. You may also need to percept the property “visible” to change the visibility of GUI windows. For more information, you can mail peidong at mail.ustc.edu.cn.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s