User`s guide
2 How to Create a GUI with GUIDE
If the editor is not already open, GUIDE opens it to display the GUI
code file, and the cursor moves to the pop-menu callback, which already
contains this code:
% --- Executes on selection change in popupmenu1.
function popupmenu 1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO )
% eventdata reserved - to be defined in a future v ersion of MATLAB
% handles structure with handles and user data (see GUIDATA)
2 Add the following code to the popupmenu1_Ca llback after the comment
that begins
% handles...
This code first retrieves two p op-up menu properties:
•
String — a cell array that contains the menu contents
•
Value — the index into the m enu contents of the selected data s et
2-32