⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stably.m

📁 基于MATLAB的辅助设计 简述了矩阵分析的重要性
💻 M
字号:
%
% STABLY  STABLY is the M-file used in the evaluation of the
%         characteristics of the given system(s), such as Routh
%         stability criterion
%

%    Author:  Ole Barup Sorensen, Rapid Data Ltd 

%    Copyright (c) 1989-94 by Rapid Data Ltd
%    Revision 10:08  07/02/94

okflag=figflag(tit1,0);

if okflag==0
  Fig13=figure('Numbertitle','off','Name',tit1,'Menubar','none',...
  'Units','normal','Position',[(170)/Scx (50)/Scy (440)/Scx (350)/Scy],'Nextplot',...
  'new','Resize','on','Color',[0.5 0.5 0.5]);
end

Sx=Scx;Sy=Scy;
config
[rtab,np,imagr]=routh(den);nn0 = size(imagr);

if np == 0
   if (nn0(1) == 0),
      istr2 = 'System is stable';
   else
      istr2 = 'System is critically stable';
   end
else
  istr2 = ['Systen is unstable,  There are ',num2str(np),' positive poles'];
end

if id > 9
   [rtabx,npx,imagrx] = routh(denx);
   nn1 = size(imagrx);
   if npx == 0
      if (nn1(1) == 0),
         istr4 = 'System is stable';
      else
      istr4 = 'System is critical stable';
      end
   else
      istr4=['Systen is unstable,  There are ',num2str(npx),' positive poles'];
   end
end
if id <= 9
   istr1='The characteristics of the system are:';
else
   istr1='The characteristics of the compensated system are:';
end
[ro,co]=size(rtab);

if co <= 8,
  Han_g(1)=uicontrol(gcf,'Style','text','String',istr1,...
  'Position',[(10)/Sx (430)/Sy (430)/Sx (20)/Sy],'HorizontalAlignment','left');
  Han_g(2)=uicontrol(gcf,'Style','text','String',istr2,...
  'Position',[(10)/Sx (410)/Sy (400)/Sx (20)/Sy],'HorizontalAlignment','left');
  Han_g(3)=uicontrol(gcf,'Style','text','String','Rouths table:',...
  'Position',[(10)/Sx (390)/Sy (400)/Sx (20)/Sy],'HorizontalAlignment','left');

  t=4;
  for row=1:ro,
    for col=1:co,
      t=t+1;
      ypos=390-20*row;
      xpos=80*col-60;
      Han_g(t)=uicontrol(gcf,'Style','text','String',num2str(rtab(row,col)),...
      'Position',[(xpos)/Sx (ypos)/Sy (80)/Sx (20)/Sy],'HorizontalAlignment','left');
    end
  end
  clear rtab

  if id > 9
    [rox,cox]=size(rtabx);
    t1=4+ro*co;
    for row=1:rox,
      for col=1:cox,
        t1=t1+1;
        ypos=390-20*row;
        xpos=80*col-60;
        Han_g(t1)=uicontrol(gcf,'Style','text','String',num2str(rtabx(row,col)),...
        'Position',[(xpos)/Sx (ypos)/Sy (80)/Sx (20)/Sy],'HorizontalAlignment','left','Visible','off');
      end
    end
    clear rtabx
    istr1='The characteristics of the uncompensated system are:';
    Han_g(t1+1)=uicontrol(gcf,'Style','push','String','Show uncompensated table','Position',...
    [(100)/Sx (15)/Sy (250)/Sx (20)/Sy],'Callback',['set([Han_g(5:t),Han_g(t1+1)],''Visible'',''off'');',...
    'set(Han_g(t+1:t1),''Visible'',''on'');set(Han_g(1),''String'',istr1);',...
    'set(Han_g(2),''String'',istr4);']);
  end


else

end
uicontrol(Fig13,'Style','push','String','Done','Position',...
[(15)/Sx (15)/Sy (80)/Sx (20)/Sy],'Callback',...
['close(Fig13);clear Fig13']);


	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -