MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelský manuál Strana 200

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 330
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 199
8 Programming the GUI
8-28
plotting of a graph to an axes. In this case, the button’s Callback callback
contains the code that generates the plot.
This example plots a graph in an axes when a button is pressed. The following
figure shows a push button and an axes as they might appear in the Layout
Editor.
1 Add this code to the 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.
surf(peaks(35));
2 Run the GUI by selecting Run from the Tools menu.
3 Click the Plot button. The plot displays in the axes.
Zobrazit stránku 199
1 2 ... 195 196 197 198 199 200 201 202 203 204 205 ... 329 330

Komentáře k této Příručce

Žádné komentáře