📄 mimo_sigma.m
字号:
function mimo_sigma(fun,f,y,Epsilon,ps,ms,qs,order,vub,vlb,handle,X_handle,input_delay,pds,qds)
% This function compute a sigma plot of the MIMO system
% This funtion is used by function mimo_freq.m .
global Xwc_ub_w Xwc_lb_w
if ishandle(X_handle)
x=str2num(get(X_handle,'String'));
else
x=X_handle;
end
if length(x)~=length(vub)
errordlg('Size mismatched!'); return
elseif any(x>vub) | any(x<vlb)
errordlg('Out off bound!'); return
end
n=length(order);
data=cell(n,n);
[len,temp]=size(Xwc_ub_w{1,1});
figure(f)
count=0;
for i=1:n
for j=1:n
bg_color=get(handle(n*(i-1)+j),'Backgroundcolor');
if ~all(bg_color==[1 1 1])
count=count+1;
end
end
end
total_count=count*len;
count=0;
h_wait=waitbar(0,'Please wait ...');
for i=1:n
for j=1:n
bg_color=get(handle(n*(i-1)+j),'Backgroundcolor');
if ~all(bg_color==[1 1 1])
freq=Xwc_ub_w{i,j}(:,2)';
data{i,j}=zeros(1,length(freq));
for k=1:length(freq)
temp=feval(fun,x,y,Epsilon,1,freq(k),...
ps,ms,qs,order,i,j,input_delay,pds,qds);
data{i,j}(k)=temp;
if temp > Xwc_ub_w{i,j}(k,1)
Xwc_ub_w{i,j}(k,1)=temp;
Xwc_ub_w{i,j}(k,3:end)=x;
end
count=count+1;
waitbar(count/total_count,h_wait);
end
end
end
end
close(h_wait)
figure(f);
for i=1:n
for j=1:n
bg_color=get(handle(n*(i-1)+j),'Backgroundcolor');
if ~all(bg_color==[1 1 1])
g=loglog(Xwc_ub_w{i,j}(:,2),data{i,j}',':');
set(g,'color',bg_color);
hold on
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -