home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 10.ddi / CONTROL.DI$ / DFRQINT2.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  511 b   |  22 lines

  1. function w=dfrqint2(a,b,c,d,Ts,npts)
  2. %DFRQINT2 Discrete auto-ranging algorithm for Nyquist and Nichols plots.
  3. %
  4. %    W=DFRQINT2(A,B,C,D,Ts,NPTS)
  5. %    W=DFRQINT2(NUM,DEN,Ts,NPTS)
  6.  
  7. %    Clay M. Thompson 7-10-90
  8. %    Copyright (c) 1986-93 by the MathWorks, Inc.
  9.  
  10. if nargin==4,
  11.   Ts = c; npts = d;
  12.   [a,b,c,d] = tf2ss(a,b);
  13. end
  14. [a1,b1] = d2c(a,b,Ts);
  15. w=freqint2(a1,b1,c,d,npts);
  16. w=w(find(w<=pi/Ts));
  17. if ~isempty(w), 
  18.   w=sort([w;linspace(min(w),pi/Ts,128).']);
  19. else
  20.   w=linspace(pi/Ts/10,pi/Ts,128).';
  21. end
  22.