User`s guide

Initialize a GUIDE GUI
Function Naming and Template
GUIDE names the output function b y appending _OutputFcn tothenameof
the G UI. This is an example of an output function template as it might appear
in the
mygui code file.
% --- Outputs from this function are returned to the command line.
function varargout = mygui_OutputFcn(hObject , eventdata,...
handles)
% varargout cell array for returning outpu t args (see VARAR GOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future v ersion of MATLAB
% handles structure with handles and user data (see GUIDATA)
% 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 a re the same as described in “GUIDE Callback Arguments”
on page 8-20.
Output Arguments
The output function has one output argument, varargout , which it returns to
the command line. By default, the output function a ssigns
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 chan ge the output by
Changing the value of
handles.output. It can be any valid MATLAB value
including a structure or cell array.
Adding output argum ents to
varargout.
varargout is a cell array. It can contain any number of output arguments.
By default, GUIDE creates just one output a rgument,
handles.output.To
create an additional output argument, create a ne w field in the
handles
structure and add it to varargout using a command similar to
varargout{2} = handles.second_output;
8-29