MATLAB Creating Graphical User Interfaces

(ff) #1

Automatically Refresh Plot in a GUIDE App


This example shows how to examine and run a prebuilt GUIDE app. The app displays a
surface plot, adds random noise to the surface, and refreshes the plot at regular intervals.
The app contains two buttons: one that starts adding random noise to the plot, and
another that stops adding noise. The slider below the plot allows the user to set the
refresh period between 0.01 and 2 seconds.

Open and Run the Example


Open and run the app. Move the slider to set the refresh interval between 0.01 and 2.0
seconds. Then click the Start Randomizing button to start adding random noise to the
plotted function. Click the Stop Randomizing button to stop adding noise and refreshing
the plot.

Automatically Refresh Plot in a GUIDE App
Free download pdf