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

  1. function [z,p,k] = cheb1ap(n, rp)
  2. %CHEB1AP    Chebyshev type I analog lowpass filter prototype.
  3. %    [Z,P,K] = CHEB1AP(N,Rp) returns the zeros, poles, and gain
  4. %    of an N-th order normalized prototype type I Chebyshev analog
  5. %    lowpass filter with Rp decibels of ripple in the passband.
  6. %    Type I Chebyshev filters are maximally flat in the stopband.
  7. %
  8. %    See also CHEBY1, CHEB1ORD, BUTTAP, CHEB2AP and ELLIPAP.
  9.  
  10. %    L. Shure 1-13-88
  11. %    (c) Copyright 1988, by The MathWorks, Inc.
  12.  
  13. j = sqrt(-1);
  14. epsilon = sqrt(10^(.1*rp)-1);
  15. mu = asinh(1/epsilon)/n;
  16. p = exp(j*(pi*(1:2:2*n-1)/(2*n) + pi/2)).';
  17. p = sinh(mu)*real(p) + j*cosh(mu)*imag(p);
  18. z = [];
  19. k = real(prod(-p));
  20. if ~rem(n,2)    % n is even so patch k
  21.     k = k/sqrt((1 + epsilon^2));
  22. end
  23.