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

nFilter order.
typeFilter type ("lp" for low-pass, "hp" for high-pass, ...)
fcNormalized cut-off frequency (-6 dB cut-off).
fenWindow type ("hn", "hm", "tr" ou "re"), see function window()
fc2Second 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");

See also

design_fir_eq(), design_fir_freq()