Thursday, July 13, 2017

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

Matlab can easily plot variables with the powerful functions provided as default, but often annoying to define at least x vector and y vector on the command window, especially when plotting variables of structure format of mat file.
In order to draw figures, first of all you should load *.mat file to the workspace, and second, determine variables to plot, and then can draw a figure using the function 'plot'. In addition to this, you can also use the function, 'legend', 'xlabel', 'ylabel', etc.
If you want to add line plot to the existing figure, you can use 'hold on' or 'hold all'.

It is not that difficut to do what has been explained so far, but would be more happy if you have some convenient tool. This kind of simple tool can be developed by Matlab GUIDE.
Let me post how to create it with GUIDE. Let's make it together.

Related posts
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