GUIDE Options
Callbacks for UIs without Code
Even when there is no code file associated with a UI FIG-file, you can still provide
callbacks for UI components to make them perform actions when used. In the Property
Inspector, you can type callbacks in the form of strings, built-in functions, or MATLAB
code file names; when your program runs, it will execute them if possible. If the callback
is a file name, it can include arguments to that function. For example, setting the
Callback property of a push button to sqrt(2) causes the result of the expression to
display in the Command Window:
ans =
1.4142
Any file that a callback executes must be in the current folder or on the MATLAB path.
For more information on how callbacks work, see “Write Callbacks Using the GUIDE
Workflow” on page 8- 2