second application continues the theme of GUI control, but this time,
we want to automate data analysis and report writing. Our goal is to
examine how certain measured Long Term Evolution (LTE) parameters vary
over time. Amplifier and transmitter characteristics vary from device to
device, but a trend over time may indicate a problem that we need to
investigate. We want to display these variations and model changes.
source data is a file of measured LTE parameters such as maximum output
power, EVM, receiver sensitivity, and spurious emissions for different
devices acquired at different times.
want to display variations in measured parameters over time and plot
these variations as a histogram (to show the type of distribution and
spread). We also want to obtain minimum, maximum, and mean values plus
standard deviation. Our GUI will automate these tasks. Using the GUIDE
tool, we build the interface (Figure 3).
Figure 3. Left: Interface built using GUIDE. Right: The same interface running an application.
uses a drag-and-drop approach, enabling you to build GUIs through a
menu of GUI items, such as push buttons, text boxes, and graphs. We link
GUI controls to the underlying MATLAB code via callback functions. For
example, when the user clicks Update to update the graph, the
application calls the following callback function. Note that the graphs
include variation with time and histograms.
% --- Executes on button press in UpdateGraphs.
function UpdateGraphs_Callback(hObject, eventdata, handles)
popup_sel_index = get(handles.popupmenu1, 'Value');
underlying code could be any MATLAB code; for example, it could be code
for controlling instruments, analyzing data, or drawing graphs.
buttons on the GUI activates the underlying code. For example, when the
user clicks Browse, a dialog box opens to locate the data file. When
the user selects Run analysis, the underlying code calculates statistics
for each measured parameter and displays the results in a dialog box.