Code covered by the BSD License  

Highlights from
MIMOtool

image thumbnail

MIMOtool

by

 

12 Nov 2001 (Updated )

Multi Input Multi Output Systems Toolbox

mfc0.m
function mfc0(tipo);
%MFC0 : funzione di creazione della 1 finestra per l'EMFC o l'IMFC
%
%
%Massimo Davini 26/05/99 --- revised 31/05/99

global stack;

set(findobj('tag','sfnota'),'visible','off');
drawnow;

[no,ni]=size(stack.general.D);

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

sizetext=.2;sizetext1=.8;

mfc(1)=uicontrol('style','frame','units','normalized','position',[.1 .32 .8 .53],...
      'backgroundcolor',[1 1 1],'visible','on','tag','mfc1');

if strcmp(tipo,'IMFC')
   
  mfc(2)=uicontrol('style','text','units','normalized','position',[.13 .6 .74 0.2],...
        'fontunits','normalized','fontsize',sizetext,'fontweight','bold',...
        'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor',[1 1 1],'tag','mfc1',...
        'string',sprintf('The current system has %u outputs, therefore the used reference model is diagonal and made up of %u independent FIRST ORDER subsystems with:',no,no));

elseif strcmp(tipo,'EMFC')
   
  mfc(2)=uicontrol('style','text','units','normalized','position',[.13 .6 .74 0.2],...
      'fontunits','normalized','fontsize',sizetext,'fontweight','bold',...
      'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor',[1 1 1],'tag','mfc1',...
      'string',sprintf('The current system has %u outputs, therefore the used reference model is diagonal and made up of %u independent subsystems with:',no,no));

  mfc(3)=uicontrol('style','text','units','normalized','position',[.13 .58 .6 0.05],...
      'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
      'backgroundcolor',[1 1 1],'HorizontalAlignment','left',...
      'foregroundcolor',[1 1 1],'tag','mfc1',...
      'string','SUBSYSTEMS ORDER');
   
   mfc(4)=uicontrol('style','radiobutton','units','normalized','position',[.73 .57 .065 0.05],...
     'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
     'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor',[1 1 1],...
     'string','1','tag','option1',...
     'callback','ordine(1);');

  mfc(5)=uicontrol('style','radiobutton','units','normalized','position',[.805 .57 .065 0.05],...
     'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
     'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor',[1 1 1],...
     'string','2','tag','option2',...
     'callback','ordine(2);');

end;   
x=length(mfc);

mfc(x+1)=uicontrol('style','text','units','normalized','position',[.13 .51 .55 0.05],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor','white',...
   'string','GAIN','tag','mfc1');

mfc(x+2)=uicontrol('style','text','units','normalized','position',[.13 .44 .55 0.05],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor','white',...
   'string','OVERSHOOT ( % )','tag','mfc1');

mfc(x+3)=uicontrol('style','text','units','normalized','position',[.13 .37 .55 0.05],...
   'fontunits','normalized','fontsize',sizetext1,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'HorizontalAlignment','left','foregroundcolor','white',...
   'string','SETTLING TIME ( sec )','tag','mfc1');

mfc(x+4)=uicontrol('style','edit','units','normalized','position',[.73 .505 .14 0.06],...
   'fontunits','normalized','fontsize',sizetext1-.21+jsz/2,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'tag','EditGain');

mfc(x+5)=uicontrol('style','edit','units','normalized','position',[.73 .435 .14 0.06],...
   'fontunits','normalized','fontsize',sizetext1-.21+jsz/2,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'tag','EditOver');

mfc(x+6)=uicontrol('style','edit','units','normalized','position',[.73 .365 .14 0.06],...
   'fontunits','normalized','fontsize',sizetext1-.21+jsz/2,'fontweight','bold',...
   'backgroundcolor',[1 1 1],'tag','EditSett');

mfc(x+7)=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','mfc1',...
   'TooltipString','Back to the previous window',...
   'callback',sprintf('back_syn(''sfnota'',%u);',length(stack.temp.handles)));

mfc(x+8)=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','back_syn(''syn0'',0);','tag','mfc1');
 
mfc(x+9)=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','BNext',...
    'TooltipString','Go to the next window',...
    'callback',sprintf('mfc1(''%s'');',upper(tipo))) ;

set(mfc(2),'foregroundcolor','red');
if strcmp(tipo,'EMFC')     
   set(mfc(3),'foregroundcolor','black');
   set(mfc(4:5),'foregroundcolor','black');
   set(mfc(x+9),'enable','off');   
end;
set(mfc(x+1:x+3),'foregroundcolor','black');
set(mfc(x+4:x+6),'backgroundcolor',[1 1 0]);
set(mfc(x+4),'string','1');

if strcmp(tipo,'EMFC')     
   set(mfc(x+4:x+6),'backgroundcolor',[.8 .8 .8],'style','text','string',' ');
elseif strcmp(tipo,'IMFC') 
   set(mfc(x+4),'string',num2str(1));
   set(mfc(x+5),'style','text','backgroundcolor',[.8 .8 .8]);
   set(mfc(x+6),'string',num2str(10));
end;

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

Contact us