MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual de usuario Pagina 200

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 330
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 199
1 2 ... 195 196 197 198 199 200 201 202 203 204 205 ... 329 330

Comentarios a estos manuales

Sin comentarios