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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 500
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 57
3 A Simple Programmatic UI
3-6
hpopup = uicontrol('Style','popupmenu',...
'String',{'Peaks','Membrane','Sinc'},...
'Position',[300,50,100,25]);
ha = axes('Units','Pixels','Position',[50,60,200,185]);
align([hsurf,hmesh,hcontour,htext,hpopup],'Center','None');
%Make the UI visible.
f.Visible = 'on';
end
6
Run your code by typing simple_gui2 at the command line. You can select a data
set in the pop-up menu and click the push buttons, but nothing happens. This
is because there is no callback code in the file to service the pop-up menu or the
buttons.
Code the Simple Programmatic UI Behavior
Program the Pop-Up Menu
The pop-up menu enables users to select the data to plot. When a user selects one
of the three data sets in the pop-up menu, MATLAB software sets the pop-up menu
Przeglądanie stron 57
1 2 ... 53 54 55 56 57 58 59 60 61 62 63 ... 499 500

Komentarze do niniejszej Instrukcji

Brak uwag