User`s guide
A GUI to Set Simulink
®
Model Parameters (GUIDE)
function CloseB utto n_Callback(hObject, eventdata, handles)
% Close the GUI and any plot window that is open
if isfield(h andl es,'PlotFigure') && ...
ishandle(handles.PlotFigure),
close(handles.PlotFigure);
end
close(handles.F14ControllerEditor);
TheListBoxCallbackandCreateFunction
This GUI does not use the list box callback because the a ctions performed on
list box items are carried out by push buttons (Simulate and store results,
Remove,andPlot). GUIDE autom atically inserts a callback stub w hen yo u
add the list box and automatically sets the
Callback property to execute this
subfunction whenever the callback is triggered (which happens when users
select an item in th e list box).
In this example, there is no need for the list box callback to execute. You
candeleteitfromtheGUIcodefileandatthesametimealsodeletethe
Callback property string in the Property Inspector so that the software does
not attempt to execute the callback.
For more information on how to trigger the list box callback, see the
description of list box.
10-79