www.pudn.com > Closid30.rar > Clwidcf.M, change:1998-05-19,size:4002b


function clwidcf 
% function clwidcf 
% 
% Invokes the window for the (local) OE  
% coprime factor identification method. 
 
% functions called: clmodest 
 
% 12-06-1997 
% (c) Paul Van den Hof 
% Mechanical Engineering Systems and Control Group 
% Delft University of Technology 
% Last update: 19-05-1998. 
% 
%******************************************************* 
% 
global CLIDscrz 
 
% Check whether the identification window is open already; 
if ~isempty(findobj('tag','CFOEWINDOW')) 
  figure(findobj('tag','CFOEWINDOW')) 
  return 
end 
% 
% If it is not open, open a new one: 
% 
%   Colors 
[frmcol,txtcol,edicol,pshcol,radcol,axscol,c7,c8,c9,c10,... 
   modcol,edtcol,pubcol,putcol,chbcol,chtcol,txbcol,pstcol]=clsetcol; 
 
%   Headers 
head1='Output error CF identification'; 
%******************************************************************** 
% 
%                        OPEN MAIN FRAME 
% 
%******************************************************************** 
% 
set(gco,'Userdata',1); 
%   Determine screen size and position and size of main ID-window: 
z=CLIDscrz; 
posfgm=[35 40 320 280]; 
% Open window 
clfgyui=figure('Menubar','none','Color',frmcol,... 
  'Numbertitle','off','Name',head1,... 
  'pos',posfgm,'Resize','on','tag','CFOEWINDOW'); 
% 
% Construct frame for info and model order selection 
fryuix=0.01;fryuiy=0.01; 
fryuipos=[fryuix fryuiy .98 .7; 
          fryuix+0.06 fryuiy+0.88 .88 .10];       % "Header"    
typyuipos =[fryuix+0.05 fryuiy+0.75 .90 .10;...   % "Text N" 
            fryuix+0.05 fryuiy+0.65 .90 .10;...   % "Text D" 
            fryuix+0.05 fryuiy+0.55 .90 .10;...   % "Text G=N/D"  
            fryuix+0.05 fryuiy+0.40 .45 .06;...	  % "Model order" 
			fryuix+0.05 fryuiy+0.35 .45 .06;...	  % "[nb1 .. nk]" 
			fryuix+0.55 fryuiy+0.37 .40 .08;... 
            fryuix+0.02 fryuiy+0.10 .30 .08;...   % "Estimate" 
            fryuix+0.34 fryuiy+0.10 .30 .08;...   % "Help" 
            fryuix+0.66 fryuiy+0.10 .30 .08];     % "Cancel" 
fryui=zeros(11,1); 
fryui(1)=uicontrol(clfgyui,'style','frame','uni','nor',... 
   'pos',fryuipos(1,:),'Back',frmcol,'fore',frmcol); 
fryui(2)=uicontrol(clfgyui,'style','text','uni','nor',... 
   'pos',fryuipos(2,:),'Back',txbcol,'Fore',txtcol,... 
   'String',['ORDER SELECTION']); 
fryui(3)=uicontrol(clfgyui,'style','text','uni','nor',... 
   'pos',typyuipos(1,:),'Back',txbcol,'Fore',txtcol,... 
   'String','y = N x + e1;    N = B1/F'); 
fryui(4)=uicontrol(clfgyui,'style','text','uni','nor',... 
   'pos',typyuipos(2,:),'Back',txbcol,'Fore',txtcol,... 
   'String','u = D x + e2;    D = B2/F'); 
fryui(5)=uicontrol(clfgyui,'style','text','uni','nor',... 
   'pos',typyuipos(3,:),'Back',txbcol,'Fore',txtcol,... 
   'String','Resulting plant model: N/D = B1/B2'); 
fryui(6)=uicontrol(clfgyui,'style','text','uni','nor',... 
   'pos',typyuipos(4,:),'Back',txbcol,'Fore',txtcol,... 
   'String','Model order:','hori','left'); 
fryui(7)=uicontrol(clfgyui,'style','text','uni','nor',... 
   'pos',typyuipos(5,:),'Back',txbcol,'Fore',txtcol,... 
   'String','[nb1 nb2 nf nk1 nk2]','hori','left'); 
fryui(8)=uicontrol(clfgyui,'style','edit','uni','nor',... 
   'pos',typyuipos(6,:),'tag','CFOEORDER',... 
   'Back',edicol,'Fore',edtcol,'String','[4 4 4 1 0]'); 
fryui(9)=uicontrol(clfgyui,'style','push','uni','nor',... 
   'pos',typyuipos(7,:),'Back',pshcol,'Fore',pstcol,... 
   'String','Estimate','Value',0); 
fryui(10)=uicontrol(clfgyui,'style','push','uni','nor',... 
   'pos',typyuipos(8,:),'Back',pshcol,'Fore',pstcol,... 
   'String','Help','Value',0); 
fryui(11)=uicontrol(clfgyui,'style','push','uni','nor',... 
   'pos',typyuipos(9,:),'Back',pshcol,'Fore',pstcol,... 
   'String','Cancel','Value',0); 
% 
% Put handles in userdata of figure 
r=length(fryui); 
us=zeros(r,1); 
us(:,1)=fryui; 
set(clfgyui,'Userdata',us); 
% 
% Set callbacks  
set(fryui(11),'callb','close(gcf);'); 
set(fryui(10),'callb','hthelp(''clcfoe.htm'')'); 
set(fryui(9),'callb','clmodest(5); close(gcf); cllight(2);');