2.1.22.3.6 ocmsp_freqz_sos


Description

Frequency and phases response of second order section filter

Syntax

int ocmsp_freqz_sos( double * mag, double * pha, double * w, UINT n, const double * pSOS, UINT nsec, double gain, int flag = OMSP_MAG_DECIBEL|OMSP_PHA_UNWRAP )

Parameters

mag
[output] magnitude response, with size n
pha
[output] phase response, with size n
w
[output] frequencies(in radians/sample) on which the response values are calculated. size n
n
[input] points number, e.g. 512
pSOS
[input] second-order section filter matrix, size nsec-by-6
nsec
[input] number of sections
gain
[input] overall gain of filter
flag
[input] indicates the unit of returned magnitude and phase values, the range of frequency (0~pi or 0~2*pi), and the if the phases are unwrapped.

Return

Return OE_NOERROR if succeed, otherwise, non-zero error code is returned (OE_NULL_POINTER, OE_INVALID_SIZE or OE_BAD_PARAM)

Examples

Remark

See Also

ocmsp_freqz

Header to Included

ocmsp.h

Reference