
8 Programming the GUI
8-18
% Get default command line output from handles structure
varargout{1} = handles.output;
Input Arguments
The output function has three input arguments: hObject, eventdata, and
handles. They are the same as described in “Input Arguments” on page 8-13.
Output Arguments
The output function has one output argument, varargout, which it returns to
the command line. By default, the output function assigns
handles.output to
varargout. So the default output is the handle to the GUI, which was assigned
to
handles.output in the opening function.
You can change the output by:
• Changing the value of
handles.output. It can be any valid MATLAB value
including a structure or cell array.
• Adding output arguments to
varargout.
varargout is a cell array. It can contain any number of output arguments.
By default, GUIDE creates just one output argument,
handles.output. To
create an additional output argument, create a new field in the
handles
structure and add it to
varargout using a command similar to
varargout{2} = handles.second_output;
Comentários a estes Manuais