Code covered by the BSD License  

Highlights from
MIMOtool

image thumbnail

MIMOtool

by

 

12 Nov 2001 (Updated )

Multi Input Multi Output Systems Toolbox

mu0.m
function mu0(n,pesi)
%MU0 : 1 finestra di sintesi e ottimizzazione MU
%
%                     mu0(n,pesi)
%
%  n         = intero che indica il numero di blocchi di integratori
%              da aggiungere al sistema
%              (presente sia in caso di sintesi che di ottimizzazione)
%
%  pesi      = vettore riga di 4 elementi rappresentanti i pesi
%              della funzione di costo da minimizzare : vedi il manuale
%              per maggiori informazioni
%              (presente solo in caso di ottimizzazione)
%
%
%Massimo Davini 02/06/99

if nargin<2 pesi=[];end;
   
global stack;

set(findobj('tag','integratori'),'visible','off');
set(findobj('tag','EditIntegr'),'visible','off');
drawnow;

G=pck(stack.general.A,stack.general.B,stack.general.C,stack.general.D);
[ty,no,ni,ns]=minfo(G);

stack.temp.integratori=n;
stack.temp.pesi=pesi;
stack.temp.sceltamatrici=1;    %indice del check button scelto
stack.temp.bTo=[no,no];
stack.temp.bMo=[no,ni];
stack.temp.bTi=[ni,ni];
stack.temp.bMi=[ni,no];
stack.temp.flag.ok1=0;      %flag di memorizzazione della 1 matrice 
stack.temp.flag.ok2=0;      %flag di memorizzazione della 2 matrice 
stack.temp.type=1;            
stack.temp.X1X2=[];
stack.temp.plant=G;

% enlarge text if java machine is running
jsz=stack.general.javasize;

sizetext1=jsz/2+.6;
campi=['''integratori'',''pesi'',''sceltamatrici'',''bTo'',''bMo'',''bTi'',''bMi'',''flag'',''type'',''X1X2'',''plant'''];

mu(1)=uicontrol('style','frame','units','normalized',...
   'position',[0.1 0.22 0.8 0.73],'backgroundcolor',[1 1 1],...
   'tag','mu0');

mu(2)=uicontrol('style','radiobutton','units','normalized','position',[0.15 0.85 0.05 0.06],...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','value',1,...
   'callback','sldopt(1,''opt1'',''opt2'',''opt3'',''opt4'');stack.temp.sceltamatrici=1;stack.temp.type=1;','tag','opt1');

mu(3)=uicontrol('style','text','units','normalized','position',[0.21 0.85 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'foregroundcolor',[1 0 0],'HorizontalAlignment','left','tag','mu0');

mu(4)=uicontrol('style','text','units','normalized','position',[0.21 0.79 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'foregroundcolor',[1 0 0],...
   'HorizontalAlignment','left','tag','mu0');

mu(5)=uicontrol('style','radiobutton','units','normalized','position',[0.15 0.68 0.05 0.06],...
   'backgroundcolor',[1 1 1],'value',0,'HorizontalAlignment','left',...
   'callback','sldopt(2,''opt1'',''opt2'',''opt3'',''opt4'');stack.temp.sceltamatrici=2;stack.temp.type=2;','tag','opt2');

mu(6)=uicontrol('style','text','units','normalized','position',[0.21 0.68 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left',...
   'tag','mu0','foregroundcolor',[1 0 0]);

mu(7)=uicontrol('style','text','units','normalized','position',[0.21 0.62 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','tag','mu0',...
   'foregroundcolor',[1 0 0]);

mu(8)=uicontrol('style','radiobutton','units','normalized','position',[0.15 0.51 0.05 0.06],...
   'backgroundcolor',[1 1 1],'value',0,'HorizontalAlignment','left',...
   'callback','sldopt(3,''opt1'',''opt2'',''opt3'',''opt4'');stack.temp.sceltamatrici=3;stack.temp.type=1;','tag','opt3');

mu(9)=uicontrol('style','text','units','normalized','position',[0.21 0.51 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','tag','mu0',...
   'foregroundcolor',[1 0 0]);

mu(10)=uicontrol('style','text','units','normalized','position',[0.21 0.45 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','tag','mu0',...
   'foregroundcolor',[1 0 0]);

mu(11)=uicontrol('style','radiobutton','units','normalized','position',[0.15 0.34 0.05 0.06],...
   'backgroundcolor',[1 1 1],'value',0,'HorizontalAlignment','left',...
   'callback','sldopt(4,''opt1'',''opt2'',''opt3'',''opt4'');stack.temp.sceltamatrici=4;stack.temp.type=2;','tag','opt4');

mu(12)=uicontrol('style','text','units','normalized','position',[0.21 0.34 0.64 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','tag','mu0',...
   'foregroundcolor',[1 0 0]);

mu(13)=uicontrol('style','text','units','normalized','position',[0.21 0.28 0.44 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','tag','mu0',...
   'foregroundcolor',[1 0 0]);

   set(mu(3),'string',sprintf('Full block on So'));
   set(mu(4),'string',sprintf('Structured block on To'));
   set(mu(6),'string',sprintf('Full block on So'));
   set(mu(7),'string',sprintf('Structured block on Mo'));
   set(mu(9),'string',sprintf('Full blocks on Si,So'));
   set(mu(10),'string',sprintf('Structured blocks on Ti,To'));
   set(mu(12),'string',sprintf('Full blocks on Si,So'));
   set(mu(13),'string',sprintf('Structured blocks on Mi,Mo'));
   
mu(14)=uicontrol('style','text','units','normalized','position',[0.65 0.85 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(performance)');
mu(15)=uicontrol('style','text','units','normalized','position',[0.65 0.79 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(stability)');
mu(16)=uicontrol('style','text','units','normalized','position',[0.65 0.68 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(performance)');
mu(17)=uicontrol('style','text','units','normalized','position',[0.65 0.62 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(stability)');
mu(18)=uicontrol('style','text','units','normalized','position',[0.65 0.51 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(performance)');
mu(19)=uicontrol('style','text','units','normalized','position',[0.65 0.45 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(stability)');
mu(20)=uicontrol('style','text','units','normalized','position',[0.65 0.34 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(performance)');
mu(21)=uicontrol('style','text','units','normalized','position',[0.65 0.28 0.2 0.06],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','center','tag','mu0',...
   'string','(stability)');
   
   
   
mu(22)=uicontrol('style','push','unit','normalized','position',[0.05 0.05 0.14 0.12],...
   'fontunits','normalized','fontsize',.35,'fontweight','bold',...
   'string','BACK','Horizontalalignment','center','tag','mu0',...
   'TooltipString','Back to the previous window',...
   'callback',sprintf('back_syn(''integratori'',%u,%s);',length(stack.temp.handles),campi)); 

mu(23)=uicontrol('style','push','unit','normalized','position',[0.2 0.05 0.14 0.12],...
   'fontunits','normalized','fontsize',.35,'fontweight','bold',...
   'string','CLOSE','Horizontalalignment','center',...
   'TooltipString','Back to the main SYNTHESIS window',...
   'callback',sprintf('back_syn(''syn0'',0,%s);',campi),'tag','mu0');
 
mu(24)=uicontrol('style','push','unit','normalized','position',[0.81 0.05 0.14 0.12],...
   'fontunits','normalized','fontsize',.35,'fontweight','bold',...
   'Horizontalalignment','center','string','NEXT','tag','mu0',...
   'TooltipString','Go to the next window','callback','mu1;');

drawnow;

stack.temp.handles=[stack.temp.handles,mu];

Contact us