📄 showcascade.m
字号:
function [diag_handle]=showCascade(fig_handle,maxrow,maxcol,Xpnummt,Xpdnummt,...
Xmnummt,qnummt,qfnummt)
temp=maxrow*maxcol;
diag_handle=zeros(1,4*temp+40);
diag_handle(4*temp+38)=uicontrol(fig_handle,...
'Style','text',...
'Position',[110 330 60 25],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'String','qr(er)');
diag_handle(4*temp+39)=uicontrol(fig_handle,...
'Style','text',...
'Position',[235 202 70 25],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'String','qqd(e)');
diag_handle(4*temp+37)=uicontrol(fig_handle,...
'Style','text',...
'Position',[100 160 600 22],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String',' IMC cascade diagram for stable processes');
diag_handle(4*temp+36)=uicontrol(fig_handle,...
'Style','text',...
'Position',[627 358 50 24],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','> y1');
diag_handle(4*temp+35)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[30 367 600 5]);
diag_handle(4*temp+34)=uicontrol(fig_handle,...
'Style','text',...
'Position',[403 377 30 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','v +');
diag_handle(4*temp+33)=uicontrol(fig_handle,...
'Style','text',...
'Position',[403 420 30 20],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','d2');
diag_handle(4*temp+32)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[405 384 5 35]);
diag_handle(4*temp+31)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[400 362 15 15]);
diag_handle(4*temp+30)=uicontrol(fig_handle,...
'Style','text',...
'Position',[585 304 18 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','>');
diag_handle(4*temp+29)=uicontrol(fig_handle,...
'Style','text',...
'Position',[584 317 18 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','-');
diag_handle(4*temp+28)=uicontrol(fig_handle,...
'Style','text',...
'Position',[410 304 18 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','>');
diag_handle(4*temp+27)=uicontrol(fig_handle,...
'Style','text',...
'Position',[409 317 18 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','-');
diag_handle(4*temp+26)=uicontrol(fig_handle,...
'Style','text',...
'Position',[83 349 40 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','/\ -');
diag_handle(4*temp+25)=uicontrol(fig_handle,...
'Style','text',...
'Position',[193 349 40 18],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','/\ -');
diag_handle(4*temp+24)=uicontrol(fig_handle,...
'Style','text',...
'Position',[30 360 20 24],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','r');
diag_handle(4*temp+23)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[459 307 129 5]);
diag_handle(4*temp+22)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[284 307 129 5]);
diag_handle(4*temp+21)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[459 307 5 61]);
diag_handle(4*temp+20)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[284 307 5 61]);
diag_handle(4*temp+19)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[600 200 5 168]);
diag_handle(4*temp+18)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[425 240 5 128]);
diag_handle(4*temp+17)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[595 302 15 15]);
diag_handle(4*temp+16)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[420 302 15 15]);
diag_handle(4*temp+15)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[85 200 516 5]);
diag_handle(4*temp+14)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[85 204 5 148]);
diag_handle(4*temp+13)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[195 240 5 112]);
diag_handle(4*temp+12)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[195 240 231 5]);
diag_handle(4*temp+11)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[80 362 15 15]);
diag_handle(4*temp+10)=uicontrol(fig_handle,...
'Style','frame',...
'Position',[190 362 15 15]);
diag_handle(4*temp+9)=uicontrol(fig_handle,...
'Style','push',...
'Position',[230 355 35 30],...
'String','Sat',...
'Callback','IMENU=2600;imcmenu;');
diag_handle(4*temp+8)=uicontrol(fig_handle,...
'Style','text',...
'Position',[435 343 20 24],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'FontSize',14,...
'HorizontalAlignment','Left',...
'String','y2');
diag_handle(4*temp+7)=uicontrol(fig_handle,...
'Style','push',...
'Position',[440 85 190 30],...
'Visible','on',...
'String','Show IMC cascade with PID inner loop',...
'Callback',['delete(diag_handle);',...
'diag_handle=showCascade2(main_fig,maxrow,maxcol,Xpnummt,Xpdnummt,Xmnummt,qnummt,qfnummt);']);
diag_handle(4*temp+40)=uicontrol(fig_handle,...
'Style','push',...
'Position',[440 50 190 30],...
'Visible','on',...
'String','Show classical PID cascade',...
'Callback',['delete(diag_handle);',...
'diag_handle=showCascade3(main_fig,maxrow,maxcol,Xpnummt,Xpdnummt,Xmnummt,qnummt,qfnummt);']);
diag_handle(4*temp+6)=uicontrol(fig_handle,...
'Style','text',...
'Position',[490 325 70 25],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'String','Process(1)');
diag_handle(4*temp+5)=uicontrol(fig_handle,...
'Style','text',...
'Position',[490 265 70 25],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'String','Model(1)');
diag_handle(4*temp+4)=uicontrol(fig_handle,...
'Style','text',...
'Position',[310 325 70 25],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'String','Process(2)');
diag_handle(4*temp+3)=uicontrol(fig_handle,...
'Style','text',...
'Position',[310 265 70 25],...
'Backgroundcolor','k',...
'Foregroundcolor',[.78 .78 .78],...
'String','Model(2)');
diag_handle(1:temp)=Xuiarray([485 350 80 40],maxrow,maxcol,0,0,...
'push','p_index=1;imcmenuM;','',Xpnummt,2100,fig_handle);
diag_handle(temp+1:2*temp)=Xuiarray([485 290 80 40],maxrow,maxcol,0,0,...
'push','p_index=1;imcmenuM;','',Xmnummt,2200,fig_handle);
diag_handle(2*temp+1:3*temp)=Xuiarray([305 350 80 40],maxrow,maxcol,0,0,...
'push','p_index=2;imcmenuM;','',Xpnummt,2100,fig_handle);
diag_handle(3*temp+1:4*temp)=Xuiarray([305 290 80 40],maxrow,maxcol,0,0,...
'push','p_index=2;imcmenuM;','',Xmnummt,2200,fig_handle);
diag_handle(4*temp+1)=Xuiarray([110 355 60 30],1,1,0,0,...
'push','p_index=1;imcmenuM;','',qnummt,2300,fig_handle);
diag_handle(4*temp+2)=Xuiarray([235 227 70 30],1,1,0,0,...
'push','p_index=1;imcmenuM;','',qfnummt,2500,fig_handle);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -