User`s guide
Ways to Manage Data in a GUIDE GUI
If the user types a number between 0 and 1 in the edit text component
and then presses Enter or clicks outside the edit text, the callback sets
handles.slider1 tothenewvalueandtheslidermovestothecorresponding
position.
If the entry is invalid—for example,
2.5—the GUI increments the value
stored in the error counter and displays a message in the edit text component
that includes the count of errors.
Sharing Data with UserData
To obtain copies of the GUI files for this example, follow the steps listed
below. If you are reading this in the MATLAB H elp browser, you can access
the example FIG-file and c ode file by clicking the followin g links. If you are
reading this on the Web or in PDF form, you should go to the corresponding
section in the MATLAB H elp Browser to use the links.
If you intend to modify the layout or code of this GUI example, you should
first save copies of its code file and F IG -file to your current folder. (You need
write a ccess to your current folder to do this.) Follow these steps to copy the
example files to your current folder, and then open them:
9-11