design_fir_wnd
Windowed cardinal sine FIR design.
Namespace: dsp::filter
Prototype
Vecf design_fir_wnd(int n, cstring type, float fc, cstring fen="hn", float fc2=0)
Parameters
n | Filter order. |
type | Filter type ("lp" for low-pass, "hp" for high-pass, ...) |
fc | Normalized cut-off frequency (-6 dB cut-off). |
fen | Window type ("hn", "hm", "tr" ou "re"), see function window() |
fc2 | Second cut-off frequency (only band-pass or band-stop type filters) |
Returns
Vector with filter coefficients.
Description
- Warning
- The cut-off frequency is specified at -6 dB instead of the classical -3 dB (attenuation factor of \(1/2\) in amplitude, \(1/4\) in power). Indeed, one of the properties of this filter is a symetry of the frequency response around the cut-off frequency (what ever the choosen window is).
Example
soit h = design_rif_fen(31, "pb" , 0.25, "hn" );