MATLAB Creating Graphical User Interfaces

(ff) #1

GUIDE App With Parameters for Displaying Plots


This example shows how to examine and run a prebuilt GUIDE app. The app contains
three edit fields and two axes. The axes display the frequency and time domain
representations of a function that is the sum of two sine waves. The top two edit fields
contain the frequency for each component sine wave. The third edit field contains the
time range and sampling rate for the plots.

Open and Run the Example


Open and run the app. Change the default values in the f1 and f2 fields to change the
frequency for each component sine wave. You can also change the three numbers
(separated by colons) in the t field. The first and last numbers specify the window of time
to sample the function. The middle number specifies the sampling rate.

Press the Plot button to see the graph of the function in the frequency and time domains.

GUIDE App With Parameters for Displaying Plots
Free download pdf