Monday, July 17, 2017

[Matlab GUI] Build simple Data Processing tool - 1/5

1. Create a tool layout in GUIDE
There are two ways to create UI(User Interface) in Matlab. One is to create UIs programmatically, and the other is to create UIs using Matlab app called GUIDE.
Both can do almost the same thing, but some syntax are different, and developing UIs programmatically takes more time. If you are new to UI development, GUIDE is recommended. Anyway, let's bring it on.

Before getting started, see https://www.mathworks.com/help/matlab/creating_guis/about-the-simple-guide-gui-example.html

# Getting started with GUIDE layout editor
1) Start GUIDE by typing 'guide' on the Matlab command window

2) 'GUIDE Quick Start' window appears, then click 'OK'.

3) Layout editor


# Create an UI
1) Component name.

2) Add the components in the layout edit as below.
  3 pushbuttons, 2 static texts, 2 pop-up menus, 1 listbox, and 1 axes

3) After layout, save the figure.
  'File > Save' or 'Ctrl+S'
  After save, you see m script created automatically. This m script is used to insert functions to implement the UI created by GUIDE above.




Related posts
0. Build simple plot tool.
1. Create a tool layout in GUIDE
2. Load mat file in structure array, and Display the file list loaded on the listbox
3. Display variables of mat file, and Plot variables on the axes
4. How to add new plot to the existing plot, and Use dynamic legend
5. Clear the axes, and Move the figure to new figure (Undock)









No comments:

Post a Comment