MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Instrukcja Użytkownika Strona 201

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 330
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 200
Examples: Programming GUI Components
8-29
Plotting to a GUI with Multiple Axes
If a GUI has multiple axes, explicitly specify which axes you want to target
before you issue a plotting command. You can make the axes you want to target
the current axes by using the
axes function. In the following command, axes1
is the
Tag property of the target axes.
axes(handles.axes1)
The following example contains two axes and two buttons. Clicking one button
generates a plot in one axes and clicking the other button generates a plot in
the other axes. The following figure shows these components as they might
appear in the Layout Editor.
1 Add this code to the Plot 1 push button’s Callback callback. The surf
function produces a 3-D shaded surface plot.
peaks is a function of two
variables, obtained by translating and scaling Gaussian distributions.
axes(handles.axes1)
surf(peaks(35));
Przeglądanie stron 200
1 2 ... 196 197 198 199 200 201 202 203 204 205 206 ... 329 330

Komentarze do niniejszej Instrukcji

Brak uwag