📄 imcmenum.m
字号:
current_obj=gcbo;
IMENU=get(gcbo,'UserData');
switch IMENU
case 2100 % process
if n_of_TF>1
edit_process;
else
[f]=crfig(50,50,520,370,['Process ',num2str(p_index),' : (' num2str(row) ',' num2str(col) ')'],...
'w','none','off');
set(f,'UserData',{[row col p_index],current_obj});
uicontrol(f,...
'Style','text',...
'Position',[20 300 400 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String',...
'Process (edit) = --------------------------------------------------------------------------------');
uicontrol(f,...
'Style','text',...
'Position',[20 180 500 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String',...
'Current process : --------------------------------------------------------------------------------------------');
uindex=get_uindex(Xpnummt,Xpdenmt,Xpdeadmt);
uicontrol(f,...
'Style','text',...
'Position',[125 125 260 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String',['Only x [ ' num2str(uindex{row,col,p_index}) ' ] required']);
uicontrol(f,'Style','edit',...
'Position',[100 195 296 20],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xpnum{row,col,1,p_index});
uicontrol(f,'Style','edit',...
'Position',[100 165 296 20],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xpden{row,col,1,p_index});
uicontrol(f,'Style','edit',...
'Position',[415 180 100 20],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String',Xpdead{row,col,1,p_index});
uicontrol(f,...
'Style','frame',...
'Position',[100 320 296 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[105 323 286 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xpnums{row,col,1,p_index},...
'UserData',[14],...
'Callback',['TF_index=1;cbackM;']);
uicontrol(f,...
'Style','frame',...
'Position',[100 275 296 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[105 278 286 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xpdens{row,col,1,p_index},...
'UserData',[12],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','frame',...
'Position',[420 298 80 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[425 301 70 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xpdeads{row,col,1,p_index},...
'UserData',[10],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','push',...
'Position',[100 20 80 25],...
'String','OK',...
'UserData',[9],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','push',...
'Position',[220 20 80 25],...
'String',' Cancel',...
'Callback','close');
uicontrol(f,...
'Style','push',...
'Position',[340 20 80 25],...
'String','Help',...
'Callback','sayhelp(2100)');
uicontrol(f,...
'Style','text',...
'Position',[20 105 90 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Upper limits of x:');
uicontrol(f,...
'Style','text',...
'Position',[20 67 90 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Lower limits of x:');
uicontrol(f,...
'Style','frame',...
'Position',[125 102 270 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
if all(length(vub)>=uindex{row,col,p_index})
temp=num2str(vub(uindex{row,col,p_index}));
else
temp='';
end
uicontrol(f,...
'Style','edit',...
'Position',[130 105 260 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'UserData',[3],...
'String',temp,...
'Callback','TF_index=1;cbackM');
uicontrol(f,...
'Style','frame',...
'Position',[125 64 270 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
if all(length(vlb)>=uindex{row,col,p_index})
temp=num2str(vlb(uindex{row,col,p_index}));
else
temp='';
end
uicontrol(f,...
'Style','edit',...
'Position',[130 67 260 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'UserData',[1],...
'String',temp,...
'Callback','TF_index=1;cbackM');
end
case 2200 % model
if n_of_TF>1
edit_model;
else
[f]=crfig(50,50,520,300,['Model ',num2str(p_index),': (' num2str(row) ',' num2str(col) ')'],...
'w','none','off');
set(f,'UserData',{[row col p_index],current_obj});
if maxrow==1 & maxcol==1 & degree_freedom==2 & ~(cascade & p_index==1)
uicontrol(f,...
'Style','text',...
'Position',[20 170 130 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Disturbance lag (edit):');
uicontrol(f,...
'Style','frame',...
'Position',[155 167 180 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[160 170 160 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',mds,...
'UserData',[18],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','text',...
'Position',[20 70 130 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Current Disturbance lag:');
uicontrol(f,...
'Style','edit',...
'Position',[160 70 160 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',mtx2str(Tcanc(2,:),2));
end
uicontrol(f,...
'Style','text',...
'Position',[20 230 400 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Model (edit) = --------------------------------------------------------------------------------');
uicontrol(f,...
'Style','text',...
'Position',[20 120 200 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Current model:');
uicontrol(f,...
'Style','text',...
'Position',[100 110 400 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','-------------------------------------------------------------------------------------');
uicontrol(f,'Style','edit',...
'Position',[100 125 296 20],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xmnum{row,col,1,p_index});
uicontrol(f,'Style','edit',...
'Position',[100 95 296 20],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String',Xmden{row,col,1,p_index});
uicontrol(f,'Style','edit',...
'Position',[415 110 100 20],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String',Xmdead{row,col,1,p_index});
uicontrol(f,...
'Style','frame',...
'Position',[100 250 296 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[105 253 286 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xmnums{row,col,1,p_index},...
'UserData',[8],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','frame',...
'Position',[100 205 296 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[105 208 286 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xmdens{row,col,1,p_index},...
'UserData',[6],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','frame',...
'Position',[420 228 80 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[425 231 70 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Xmdeads{row,col,1,p_index},...
'UserData',[4],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','push',...
'Position',[100 20 80 25],...
'String','OK',...
'UserData',[3],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','push',...
'Position',[220 20 80 25],...
'String',' Cancel',...
'Callback','close');
uicontrol(f,...
'Style','push',...
'Position',[340 20 80 25],...
'String','Help',...
'Callback','sayhelp(2710)');
end
case 2300 % Forward part controller
if maxrow<=1 & maxcol<=1
[f]=crfig(50,50,520,300,'Forward Path Controller','w','none','off');
set(f,'UserData',{[row col p_index],current_obj});
uicontrol(f,...
'Style','text',...
'Position',[20 220 400 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Invert: ------------------------------------------------------------------------------------- ');
uicontrol(f,...
'Style','text',...
'Position',[20 115 200 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Current IMC controller:');
uicontrol(f,...
'Style','text',...
'Position',[100 80 400 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','---------------------------------------------------------------------------');
uicontrol(f,...
'Style','text',...
'Position',[20 150 100 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Order of the filter:');
uicontrol(f,...
'Style','text',...
'Position',[230 150 100 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Filter time constant:');
uicontrol(f,...
'Style','frame',...
'Position',[330 147 70 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[335 150 60 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',Epsilon{row,col}(1),...
'UserData',[12],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,'Style','edit',...
'Position',[100 95 296 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',qden{row,col},...
'Enable','off');
temp=strrep(qdenc{row,col},'e',num2str(Epsilon{row,col}(1)));
uicontrol(f,'Style','edit',...
'Position',[100 65 296 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',temp,...
'Enable','off');
uicontrol(f,...
'Style','frame',...
'Position',[100 240 296 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[105 243 286 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',qnums{row,col},...
'UserData',[8],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','frame',...
'Position',[100 195 296 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[105 198 286 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',qdens{row,col},...
'UserData',[6],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','frame',...
'Position',[145 147 35 24],...
'Backgroundcolor','w',...
'Foregroundcolor','k');
uicontrol(f,...
'Style','edit',...
'Position',[150 150 25 18],...
'Backgroundcolor','w',...
'Foregroundcolor','k',...
'String',num2str(order{row,col}),...
'UserData',[4],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','push',...
'Position',[100 20 80 25],...
'String','OK',...
'UserData',[3],...
'Callback',['TF_index=1;cbackM']);
uicontrol(f,...
'Style','push',...
'Position',[220 20 80 25],...
'String',' Cancel',...
'Callback','close');
uicontrol(f,...
'Style','push',...
'Position',[340 20 80 25],...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -