| ellipord {gsignal} | R Documentation | 
Elliptic Filter Order
Description
Compute elliptic filter order and cutoff for the desired response characteristics.
Usage
ellipord(Wp, Ws, Rp, Rs, plane = c("z", "s"))
Arguments
| Wp,Ws | pass-band and stop-band edges. For a low-pass or high-pass
filter,  | 
| Rp | allowable decibels of ripple in the pass band. | 
| Rs | minimum attenuation in the stop band in dB. | 
| plane | "z" for a digital filter or "s" for an analog filter. | 
Value
A list of class FilterSpecs with the following list
elements:
- n
- filter order 
- Wc
- cutoff frequency 
- type
- filter type, one of - "low",- "high",- "stop", or- "pass".
- Rp
- dB of passband ripple. 
- Rs
- dB of stopband ripple. 
Author(s)
Paulo Neis, p_neis@yahoo.com.br,
adapted by Charles Praplan.
Conversion to R by Tom Short,
adapted by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
See Also
buttord, cheb1ord,
cheb2ord, ellip
Examples
fs <- 10000
spec <- ellipord(1000/(fs/2), 1200/(fs/2), 0.5, 29)
ef <- ellip(spec)
hf <- freqz(ef, fs = fs)
plot(c(0, 1000, 1000, 0, 0), c(0, 0, -0.5, -0.5, 0),
     type = "l", xlab = "Frequency (Hz)", ylab = "Attenuation (dB)",
     col = "red", ylim = c(-35,0), xlim = c(0,2000))
lines(c(5000, 1200, 1200, 5000, 5000), c(-1000, -1000, -29, -29, -1000),
      col = "red")
lines(hf$w, 20*log10(abs(hf$h)))