User`s guide

10 Examples of GUIDE GUIs
This is an example of calling a GUI with a property value pair. In this
case, the figure property is
'Title', and its value is the string 'Confirm
Close'
.Openingmodaldlg with this syntax displays the text “Confirm
Close” at the top o f the dialog box.
2 The modal dialog box opens with the 'Position' obtained from the GUI
that calls it.
3 The opening function in the modal modaldlg code file:
Makes the dialog modal.
Executes the
uiwait command, which causes the dialog box to wait for
theusertoclickYes or No,orclicktheclosebox(
X) on the window
border.
4 When a user clicks one of the two push buttons, the callback for the push
button:
Updates the output field in the
handles structure.
Executes
uiresume to return control to the opening function where
uiwait is called.
5 The output function is called, which returns the string Yes or No as an
output argument, and deletes the dialog box with the com mand:
delete(handles.figure1)
6 When the GUI with the Close button regains control, it receives the string
Yes or No.Iftheansweris'No', it does nothing. If the answer is 'Yes',the
Close button callback closes the GUI with the command:
delete(handles.figure1)
10-104