📄 browse_results.m
字号:
function handle=results(fig_h,row,col,flag)
global Xwc_ub_w Xwc_lb_w
if flag==1
data=Xwc_ub_w;
[tmp,tmp1]=max(data{row,col}(:,1));
else
data=Xwc_lb_w;
tmp1=4;
end
if all(data{row,col}(1,3:end)==0)
warndlg(['There is no upper (lower) bound information of the element (',...
num2str(row),',',num2str(col),...
'). Perhaps, it has been cleared for some reason.',...
' Please compute (re-compute) the upper bound.']);
end
handle(1)=uicontrol('Parent',fig_h, ...
'Style','frame',...
'Position',[2 104 547 60]);
handle(2)=uicontrol(fig_h,...
'Style','text',...
'Position',[30 142 70 20],...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Frequency:');
handle(3)=uicontrol(fig_h,...
'Style','edit',...
'Position',[30 128 60 18],...
'Backgroundcolor','w',...
'HorizontalAlignment','Left',...
'String',num2str(data{row,col}(tmp1,2)));
handle(4)=uicontrol(fig_h,...
'Style','text',...
'Position',[100 142 70 20],...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Magnitude:');
handle(5)=uicontrol(fig_h,...
'Style','edit',...
'Position',[100 128 60 18],...
'Backgroundcolor','w',...
'HorizontalAlignment','Left',...
'String',num2str(data{row,col}(tmp1,1)));
handle(6)=uicontrol(fig_h,...
'Style','text',...
'Position',[170 142 270 20],...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','Associated plant uncertain parameters (x) of the');
handle(7)=uicontrol(fig_h,...
'Style','text',...
'Position',[442 142 80 20],...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','bound');
handle(8)=uicontrol(fig_h,...
'Style','edit',...
'Position',[170 128 375 18],...
'Backgroundcolor','w',...
'HorizontalAlignment','Left',...
'String',lessblnk(num2str(data{row,col}(tmp1,3:end))),...
'Callback',['temp=str2num(get(gcbo,''String''));',...
'if length(temp)~=length(vub) errordlg(''Size mismatched!'');',...
'elseif any(temp>vub) | any(temp<vlb) errordlg(''Out off bound!'');',...
'else x=temp; end']);
handle(9)=uicontrol(fig_h,...
'Style','push',...
'Position',[534 149 13 13],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','center',...
'String','x',...
'Callback','delete(B_handle);');
handle(10)=uicontrol(fig_h,...
'Style','push',...
'Position',[12 140 13 13],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','center',...
'String','/\',...
'Callback','scroll(B_handle,1);');
handle(11)=uicontrol(fig_h,...
'Style','push',...
'Position',[12 120 13 13],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','center',...
'String','\/',...
'Callback','scroll(B_handle,-1);');
handle(12)=uicontrol(fig_h,...
'Style','push',...
'Position',[350 107 180 20],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String','Add a specified plant response',...
'Callback',['mimo_sigma(fun,fig_h,y,Epsilon,cell2str(p),cell2str(m),',...
'cell2str(q),order,vub,vlb,M1_handle,B_handle(8),input_delay,',...
'pds,cell2str(qd));']);
handle(13)=uicontrol(fig_h,...
'Style','text',...
'Position',[30 105 80 18],...
'Foregroundcolor','k',...
'HorizontalAlignment','Left',...
'String','I/O element :');
handle(14)=uicontrol(fig_h,...
'Style','edit',...
'Position',[100 108 30 18],...
'Foregroundcolor','k',...
'Backgroundcolor','w',...
'HorizontalAlignment','Left',...
'String',num2str(row),...
'Callback','row=min([str2num(get(gco,''String'')) maxrow]); ');
handle(15)=uicontrol(fig_h,...
'Style','edit',...
'Position',[140 108 30 18],...
'Foregroundcolor','k',...
'Backgroundcolor','w',...
'HorizontalAlignment','Left',...
'String',num2str(col),...
'Callback','col=min([str2num(get(gco,''String'')) maxcol]); ');
if flag==1
handle(16)=uicontrol(fig_h,...
'Style','push',...
'Position',[398 147 40 15],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String','upper',...
'Callback','delete(B_handle); B_handle=browse_results(fig_h,row,col,2);');
handle(17)=uicontrol(fig_h,...
'Style','push',...
'Position',[190 107 130 20],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String','Get the worse case plant',...
'Callback','delete(B_handle); B_handle=browse_results(fig_h,row,col,1);');
else
handle(16)=uicontrol(fig_h,...
'Style','push',...
'Position',[398 147 40 15],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String','lower',...
'Callback','delete(B_handle); B_handle=browse_results(fig_h,row,col,1);');
handle(17)=uicontrol(fig_h,...
'Style','push',...
'Position',[190 107 130 20],...
'Backgroundcolor',[ 0 .5 .5 ],...
'Foregroundcolor','k',...
'HorizontalAlignment','Center',...
'String','Update parameters',...
'Callback','delete(B_handle); B_handle=browse_results(fig_h,row,col,2);');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -