Code covered by the BSD License  

Highlights from
MIMOtool

image thumbnail

MIMOtool

by

 

12 Nov 2001 (Updated )

Multi Input Multi Output Systems Toolbox

modeling
function modeling
%MODELING : inizializza il campo "general" della variabile globale
%           "stack" e crea la finestra principale di Modeling (con
%           tutti i menu)
%
% Massimo Davini 12/05/99 --- revised 16/03/00

global stack;

%-----------------inizializzazione di stack.general------------------

stack.general.model='';               % model name
stack.general.A=[];                   % matrix A
stack.general.B=[];                   % matrix B
stack.general.C=[];                   % matrix C
stack.general.D=[];                   % matrix D
stack.general.M_flag=0;               % new (unsaved) model flag
stack.general.K_flag=0;               % new (unsaved) controller flag

load(which('advanced.mat'));          
stack.general.adv_flag=advanced_flag; % advanced flag: attiva i due
                                      % comandi "All ..." e "Both ..."
                                      % del menu di evaluation
% addad by giampy -- dec 03
clear advanced_flag;
                                      
%--------------------------MAIN WINDOW-------------------------------
set(gcf,'Name','     MIMO Tool : MODELING');

% Menus :
%------------------------
crea_menu;           
drawnow;

set(findobj('tag','tools_1'),'enable','on');
set(findobj('tag','view_1'),'enable','off');
set(findobj('tag','anal_1'),'enable','off');
set(findobj('tag','synt_1'),'enable','off');
set(findobj('tag','opti_1'),'enable','off');
set(findobj('tag','eval_1'),'enable','off');
set(findobj('tag','simu_1'),'enable','off');
%------------------------

ABCDoff=['set(findobj(''tag'',''FrameA''),''visible'',''off'');',...
         'set(findobj(''tag'',''FrameB''),''visible'',''off'');',...
         'set(findobj(''tag'',''FrameC''),''visible'',''off'');',...
         'set(findobj(''tag'',''FrameD''),''visible'',''off'');'];

Aon=['set(findobj(''tag'',''FrameA''),''visible'',''on'');'];
Bon=['set(findobj(''tag'',''FrameB''),''visible'',''on'');'];
Con=['set(findobj(''tag'',''FrameC''),''visible'',''on'');'];
Don=['set(findobj(''tag'',''FrameD''),''visible'',''on'');'];

FrameA=uicontrol('style','frame','tag','FrameA',...
   'units','normalized','position',[.037 .833 .106 .11],...
   'backgroundcolor',[1 1 1],'Visible','off');

BottA=uicontrol('style','push','tag','bottA',...
   'unit','normalized','position',[0.05 0.85 0.08 0.08],...
   'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
   'string','A','Horizontalalignment','center','Enable','off',...
   'TooltipString','Visualize system matrix A',...
   'callback',[ABCDoff,Aon,...
      'set(gcf,''userdata'',[{''A''},{''sy''},{stack.general.A}]);',...
      'visual(stack.general.A,''A'');']);

FrameB=uicontrol('style','frame','tag','FrameB',...
   'units','normalized','position',[0.167 0.833 0.106 0.11],...
   'backgroundcolor',[1 1 1],'Visible','off');

BottB=uicontrol('style','push','tag','bottB',...
   'unit','normalized','position',[0.18 0.85 0.08 0.08],...
   'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
   'string','B','Horizontalalignment','center','Enable','off',...
   'TooltipString','Visualize system matrix B',...
   'callback',[ABCDoff,Bon,...
      'set(gcf,''userdata'',[{''B''},{''sy''},{stack.general.B}]);',...
      'visual(stack.general.B,''B'');']);  

FrameC=uicontrol('style','frame','tag','FrameC',...
   'units','normalized','position',[0.297 0.833 0.106 0.11],...
   'Visible','off','backgroundcolor',[1 1 1]);

BottC=uicontrol('style','push','tag','bottC',...
   'unit','normalized','position',[0.31 0.85 0.08 0.08],... 
   'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
   'string','C','Horizontalalignment','center','enable','off',...
   'TooltipString','Visualize system matrix C',...
   'callback',[ABCDoff,Con,...
      'set(gcf,''userdata'',[{''C''},{''sy''},{stack.general.C}]);',...
      'visual(stack.general.C,''C'');']);

FrameD=uicontrol('style','frame','tag','FrameD',...
   'units','normalized','position',[0.427 0.833 0.106 0.11],...
    'Visible','off','backgroundcolor',[1 1 1]);

BottD=uicontrol('style','push','tag','bottD',...
   'unit','normalized','position',[0.44 0.85 0.08 0.08],... 
   'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
   'string','D','Horizontalalignment','center','enable','off',...
   'TooltipString','Visualize system matrix D',...
   'callback',[ABCDoff,Don,...
      'set(gcf,''userdata'',[{''D''},{''sy''},{stack.general.D}]);',...
      'visual(stack.general.D,''D'');']);

BottNew = uicontrol('style','push','tag','bottNew',...
   'unit','normalized','position',[0.05 0.05 0.12 0.12],...
   'fontunits','normalized','fontsize',0.35,'fontweight','bold',...
   'string','NEW','Horizontalalignment','center',...
   'TooltipString','Create a new system',...
   'callback','new0;');

BottLoad = uicontrol('style','push','tag','bottLoad',...
   'unit','normalized','position',[0.22 0.05 0.12 0.12],...
   'fontunits','normalized','fontsize',0.35,'fontweight','bold',...
   'string','LOAD','Horizontalalignment','center',...
   'TooltipString','Load an existing system',...
   'callback','load_m;');

BottAna=uicontrol('style','push','tag','BottAna',...
   'unit','normalized','position',[0.46 0.05 0.22 0.12],...
   'fontunits','normalized','fontsize',0.35,'fontweight','bold',...
   'string','ANALYSIS','Horizontalalignment','center',...
   'TooltipString','Go to the Analysis main Window',...
   'callback','ana_syn(1);','enable','off');

BottSyn=uicontrol('style','push','tag','BottSyn',...
   'unit','normalized','position',[0.73 0.05 0.22 0.12],...
   'fontunits','normalized','fontsize',0.35,'fontweight','bold',...
   'string','SYNTHESIS','Horizontalalignment','center',...
   'TooltipString','Go to the Synthesis main Window',...
   'callback','ana_syn(2);','enable','off');
%--------------------------------------------------------------------

Contact us