MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 602

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 601
1 2 ... 597 598 599 600 601 602 603 604 605 606 607 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag