iir1
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
Contents
iir1
An Infinite Impulse Response (IIR) filter.
Usage:
iir1(f1, f2, m, rp, rs, inv, type)
Function:
Computes the filter coefficients for an IIR filter with cutoff frequencies f1 and f2 and the order m.
Parameters:
- f1
- The rel. lower cutoff frequency.
- f2
- The rel. upper cutoff frequency (
0 <=
f1<
f2<= 0.5
).
- m
- The filter order (m
>= 2
). The default is3
.
- rp
- The passband riple in dB (rp
> 0
). The default is0.5
.
- rs
- The stopband damping in dB (rs
> 0
). The default is40
.
- inv
- The invert frequency response (
0
|1
). The default is0
.
- type
- The type of filter to use. The following values are supported:
1
A Butterworth filter
2
A Chebyshev filter
3
An elliptic filter (This is the default).
Result:
A matrix c
with 2 columns:
(c[*,0] = poles
, c[*,1] = zeros
)
Usage:
iir1(f1, f2, m, rp, rs, inv, type, x)
Function:
Computes the filter coefficients for an IIR filter with cutoff frequencies f1 and f2 and the order m and apply it to the signal x.
Parameters:
- x
- A signal vector.
For all other parameters see irr1
above.
Result:
A filtered signal of the same type as x.