3 %> @brief Properties Window
for Fuzzy Rule-Based Model (@ref frbm)
5 %> @image html Screenshot-uip_frbm.png
7 %> <b>Multiple logical targets</b>: frbm::flag_class2mo
9 %> <b>Scale</b>: frbm::scale
11 %> <b>Epsilon</b>: frbm::epsilon
13 %> <b>Use Input/output space</b>: frbm::flag_iospace
15 %> <b>Clone closest rule radius at
new rule</b>: frbm::flag_clone_rule_radii
17 %> <b>Add Ps < Pmin to condition...</b>: frbm::flag_consider_Pmin
19 %> <b>Rule updating
function</b>: frbm::s_f_update_rules
21 %> <b>Group rules per
class</b>: frbm::flag_perclass
23 %> <b>Firing level calculator</b>: frbm::s_f_get_firing
25 %> <b>Takagi-Sugeno order</b>: frbm::ts_order
27 %> <b>Defuzzification</b>: frbm::flag_wta
29 %> <b>Global RLS</b>: frbm::flag_rls_global
34 function varargout = uip_frbm(varargin)
35 % Last Modified by GUIDE v2.5 19-Mar-2011 22:55:31
37 % Begin initialization code - DO NOT EDIT
39 gui_State =
struct(
'gui_Name', mfilename, ...
40 'gui_Singleton', gui_Singleton, ...
41 'gui_OpeningFcn', @uip_frbm_OpeningFcn, ...
42 'gui_OutputFcn', @uip_frbm_OutputFcn, ...
43 'gui_LayoutFcn', [] , ...
45 if nargin && ischar(varargin{1})
46 gui_State.gui_Callback = str2func(varargin{1});
50 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
52 gui_mainfcn(gui_State, varargin{:});
54 % End initialization code - DO NOT EDIT
57 % --- Executes just before uip_frbm is made visible.
58 function uip_frbm_OpeningFcn(hObject, eventdata, handles, varargin)
59 handles.output.flag_ok = 0;
60 guidata(hObject, handles);
65 % --- Outputs from this function are returned to the command line.
66 function varargout = uip_frbm_OutputFcn(hObject, eventdata, handles)
68 uiwait(handles.figure1);
69 handles = guidata(hObject);
70 varargout{1} = handles.output;
74 varargout{1} = output;
78 function pushbuttonCreateFRBM_Callback(hObject, eventdata, handles)
81 %
'f_train', sprintf(
'@%s',
fel(
get(handles.popupmenuFTrain,
'String'))), ...
82 %
'max_rules_per_group', sprintf(
'%d', eval(
get(handles.editMaxR,
'String'))), ...
83 %
's_script_support_rule', sprintf(
'''%s
''',
fel(
get(handles.popupmenu_f_support_rule,
'String'),
get(handles.popupmenu_f_support_rule,
'Value'))), ...
84 handles.output.params = {...
85 'scale',
get(handles.editScale,
'String'), ...
86 'epsilon',
get(handles.editEpsilon,
'String'), ...
87 'flag_consider_Pmin', sprintf(
'%d',
get(handles.checkboxConPMin,
'Value') ~= 0), ...
88 'flag_perclass', sprintf(
'%d',
get(handles.checkboxPerClass,
'Value') ~= 0), ...
89 'flag_clone_rule_radii', sprintf(
'%d',
get(handles.checkboxCloneRadius,
'Value') ~= 0), ...
90 'flag_iospace', sprintf(
'%d',
get(handles.checkboxIOSpace,
'Value') ~= 0), ...
91 's_f_get_firing', sprintf(
'''%s
''',
fel(
get(handles.popupmenuFiring,
'String'),
get(handles.popupmenuFiring,
'Value'))), ...
92 's_f_update_rules', sprintf(
'''%s
''',
fel(
get(handles.popupmenuFRuleUpdate,
'String'),
get(handles.popupmenuFRuleUpdate,
'Value'))), ...
93 'flag_rls_global', sprintf(
'%d',
get(handles.checkbox_flag_rls_global,
'Value') ~= 0), ...
94 'rho', mat2str(eval(
get(handles.editRho,
'String'))), ...
95 'ts_order', sprintf(
'%d',
get(handles.popupmenuTSOrder,
'Value')-1), ...
96 'flag_wta', sprintf(
'%d',
get(handles.popupmenuDefuzzification,
'Value') ~= 1) ...
97 'flag_class2mo', sprintf(
'%d',
get(handles.checkboxFlagClass2MO,
'Value') ~= 0)...
99 %
'flag_b_classic', sprintf(
'%d',
get(handles.checkboxBClassic,
'Value') ~= 0), ...
100 %
'new_rule_factor', mat2str(eval(
get(handles.editNewRuleFactor,
'String'))), ...
101 handles.output.flag_ok = 1;
102 guidata(hObject, handles);
109 function popupmenuFiring_Callback(hObject, eventdata, handles)
111 function popupmenuFiring_CreateFcn(hObject, eventdata, handles)
112 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
113 set(hObject,'BackgroundColor','white');
116 function checkboxConPMin_Callback(hObject, eventdata, handles)
118 function popupmenuFRuleUpdate_Callback(hObject, eventdata, handles)
120 function popupmenuFRuleUpdate_CreateFcn(hObject, eventdata, handles)
121 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
122 set(hObject,'BackgroundColor','white');
125 function editMaxR_Callback(hObject, eventdata, handles)
127 function editMaxR_CreateFcn(hObject, eventdata, handles)
128 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
129 set(hObject,'BackgroundColor','white');
132 function popupmenuFTrain_Callback(hObject, eventdata, handles)
134 function popupmenuFTrain_CreateFcn(hObject, eventdata, handles)
135 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
136 set(hObject,'BackgroundColor','white');
139 function popupmenuRuleGrouping_Callback(hObject, eventdata, handles)
141 function popupmenuRuleGrouping_CreateFcn(hObject, eventdata, handles)
142 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
143 set(hObject,'BackgroundColor','white');
146 function editScale_Callback(hObject, eventdata, handles)
148 function editScale_CreateFcn(hObject, eventdata, handles)
149 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
150 set(hObject,'BackgroundColor','white');
153 function editEpsilon_Callback(hObject, eventdata, handles)
155 function editEpsilon_CreateFcn(hObject, eventdata, handles)
156 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
157 set(hObject,'BackgroundColor','white');
160 function popupmenuTSOrder_Callback(hObject, eventdata, handles)
162 function popupmenuTSOrder_CreateFcn(hObject, eventdata, handles)
163 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
164 set(hObject,'BackgroundColor','white');
167 function editRho_Callback(hObject, eventdata, handles)
169 function editRho_CreateFcn(hObject, eventdata, handles)
170 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
171 set(hObject,'BackgroundColor','white');
174 function checkboxIOSpace_Callback(hObject, eventdata, handles)
176 function checkboxPerClass_Callback(hObject, eventdata, handles)
178 function checkboxCloneRadius_Callback(hObject, eventdata, handles)
180 function popupmenuRLSOverall_Callback(hObject, eventdata, handles)
182 function popupmenuRLSOverall_CreateFcn(hObject, eventdata, handles)
183 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
184 set(hObject,'BackgroundColor','white');
187 function popupmenuDefuzzification_Callback(hObject, eventdata, handles)
189 function popupmenuDefuzzification_CreateFcn(hObject, eventdata, handles)
190 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
191 set(hObject,'BackgroundColor','white');
195 % --- Executes on selection change in popupmenuFDD.
196 function popupmenuFDD_Callback(hObject, eventdata, handles)
198 % --- Executes during
object creation, after setting all properties.
199 function popupmenuFDD_CreateFcn(hObject, eventdata, handles)
200 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
201 set(hObject,'BackgroundColor','white');
205 % --- Executes on button press in checkboxBClassic.
206 function checkboxBClassic_Callback(hObject, eventdata, handles)
208 function editNewRuleFactor_Callback(hObject, eventdata, handles)
210 % --- Executes during
object creation, after setting all properties.
211 function editNewRuleFactor_CreateFcn(hObject, eventdata, handles)
212 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
213 set(hObject,'BackgroundColor','white');
216 % --- Executes on button press in checkboxFlagClass2MO.
217 function checkboxFlagClass2MO_Callback(hObject, eventdata, handles)
220 % --- Executes on selection change in popupmenu_f_support_rule.
221 function popupmenu_f_support_rule_Callback(hObject, eventdata, handles)
223 % --- Executes during
object creation, after setting all properties.
224 function popupmenu_f_support_rule_CreateFcn(hObject, eventdata, handles)
226 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
227 set(hObject,'BackgroundColor','white');
230 % --- Executes on button press in checkbox_flag_rls_global.
231 function checkbox_flag_rls_global_Callback(hObject, eventdata, handles)
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)