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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 62
Program the Simple GUIDE GUI
It then uses a switch statement to make the selected data set the current
data. The last statement saves the changes to the
handles structure.
% Determine the selected data set.
str = get(hObject, 'String');
val = get(hObject,'Value');
% Set current data to the selected data se t.
switch str{v al};
case 'Peaks' % User selects peaks.
handles.current_data = handles. peaks;
case 'Membra ne' % User selects membrane.
handles.current_data = handles. membrane;
case 'Sinc' % User selects sinc.
handles.current_data = handles. sinc;
end
% Save the handles structure.
guidata(hObject,handles)
Program the Push Buttons
Each of the push b uttons creates a different type of plot using the data
specified by the current selection in the pop-up menu. The push button
callbacks get data from the
handles structure and then plot it.
2-33
Przeglądanie stron 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag