User`s guide

A GUI to Set Simulink
®
Model Parameters (GUIDE)
if isequal(R esul tNum,1)
ResultsStr = {['Run1',num2str(Kf), ' ',num2str(Ki)]};
else
ResultsStr = [ResultsStr;...
{['Run',num2str(ResultNum),' ',num2str(Kf),' ', ...
num2str(Ki)]}];
end
set(handles.ResultsList,'String',Re sultsStr);
% Store the new ResultsData
handles.ResultsData = ResultsDa ta;
guidata(hObject, handles)
Remove Results from List Box
The GUI Remove button callback deletes any selected item from the
Results list list box. It also deletes the corresponding run data from the
handles structure. When a user clicks the Remove button, the callback
executes the following steps:
Determines w hich list box items are selected when a user clicks the
Remove button and removes those items from the list box
String property
by setting each item to the empty m atrix
[].
Removes the deleted data from the
handles structure.
Displays the string
<empty> an d disables the Remove and Plot buttons
(using the
Enable property), if all the items in the list box a re removed.
Save the changes to the
handles structure (guida ta).
Here is the Remove button callback:
function RemoveButton_Cal lback(hObject, eventdata, handles)
currentVal = get(handles.ResultsList,'Value');
resultsStr = get(handles.ResultsList,'String');
numResults = size(resultsStr,1);
% Remove the data and list entry for the selected value
resultsStr(currentVal) =[];
handles.ResultsData(currentVal)=[];
% If there are no other entries, disable the Remove and Plot
button
% and change the list string to <empty>
10-75