Signal Toolkit - cheb1ord


Function File: n = cheb1ord (wp, ws, rp, rs)
Function File: n = cheb1ord ([wp1, wp2], [ws1, ws2], rp, rs)
Function File: n = cheb1ord ([wp1, wp2], [ws1, ws2], rp, rs, "s")
Function File: [n, wc] = cheb1ord (…)
Function File: [n, wc_p, wc_s] = cheb1ord (…)

Compute the minimum filter order of a Chebyshev type I filter with the desired response characteristics. The filter frequency band edges are specified by the passband frequency wp and stopband frequency ws. Frequencies are normalized to the Nyquist frequency in the range [0,1]. rp is the allowable passband ripple measured in decibels, and rs is the minimum attenuation in the stop band, also in decibels.

The output arguments n and wc_p (or n and wc_s) can be given as inputs to cheby1. Using wc_p makes the filter characteristic touch at least one pass band corner and using wc_s makes the characteristic touch at least one stop band corner.

If wp and ws are scalars, then wp is the passband cutoff frequency and ws is the stopband edge frequency. If ws is greater than wp, the filter is a low-pass filter. If wp is greater than ws, the filter is a high-pass filter.

If wp and ws are vectors of length 2, then wp defines the passband interval and ws defines the stopband interval. If wp is contained within ws (ws1 < wp1 < wp2 < ws2), the filter is a band-pass filter. If ws is contained within wp (wp1 < ws1 < ws2 < wp2), the filter is a band-stop or band-reject filter.

If the optional argument "s" is given, the minimum order for an analog elliptic filter is computed. All frequencies wp and ws are specified in radians per second.

See also: buttord, cheby1, cheb2ord, ellipord.