MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 602

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 601
12 Code a Programmatic GUI
function pushbu tton _callback(hObject, eventdata, var1, va r2)
plot(var1,var2)
When you run this GUI by pressing the push button, you see a line graph of
myvar appearing as a magenta dashed line, similar to the following (graphs
candifferduetousingthe
rand function to generate data).
Because the value of myvar was copied into the callback when it was set,
clicking the button always produces the same plot, even if the value of
myvar
changes in the base workspace.
For m ore information, see “D efining Callbacks as a Cell Array of Strings
—SpecialCase.
12-16
Vue de la page 601
1 2 ... 597 598 599 600 601 602 603 604 605 606 607 ... 758 759

Commentaires sur ces manuels

Pas de commentaire