firamp
Amplitude response of a symetrical or antisymetrical FIR filter (linear phase).
Namespace: dsp::filter
Prototype
tuple<Vecf, Vecf> firamp(const Vecf &h, int L=1024, bool symetrical=true)
Parameters
L | Frequency resolution. |
h | Filter coefficients. |
symetrical | True if the coefficients are symetrical around \((N-1)/2\) (FIR filter of type I or II). Otherwise, a filter of type III or IV is assumed. |
Returns
A tuple of two vectors: frequency vector (normalized, between 0 and 0.5), and the amplitude response vector.
Description
This function computes the amplitude response \(A(\omega)\), for a real FIR filter with linear phase (the coefficients must be symetrical or antisymetrical around the central point).
For a symetrical filter, the response is:
- Warning
- The real symetry (or antisymetry) of the coefficients is not checked checked!