This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

coeffs

Filter coefficients

Syntax

s = coeffs(sysobj)
s = coeffs(sysobj,'Arithmetic',arithType)

Description

example

s = coeffs(sysobj) returns the coefficients of filter System object™, sysobj, in the structure s.

s = coeffs(sysobj,'Arithmetic',arithType) returns filter coefficients for the filter System object sysobj with the arithmetic specified in arithType.

Examples

collapse all

FIRHalfbandInterp = dsp.FIRHalfbandInterpolator('Specification',...
    'Filter order and transition width','FilterOrder',26);
C = coeffs(FIRHalfbandInterp);
C.Numerator
ans = 1×27

    0.0525         0   -0.0379         0    0.0537         0   -0.0771         0    0.1172         0   -0.2060         0    0.6345    1.0000    0.6345         0   -0.2060         0    0.1172         0   -0.0771         0    0.0537         0   -0.0379         0    0.0525

% Impulse response of the filter
fvtool(FIRHalfbandInterp,'impulse')

Input Arguments

collapse all

Specify the arithmetic used during analysis. The analysis tool assumes a double precision filter when the arithmetic input is not specified and the filter System object is in an unlocked state. The coeffs method returns the quantized filter coefficients when the arithmetic is set to 'single' or 'fixed'. You can specify 'fixed' only if the System object supports fixed-point arithmetic. When you specify 'fixed', the arithmetic changes depend on the setting of the CoefficientDataType property and whether the System object is locked or unlocked.

Details for Fixed-Point Arithmetic

System Object StateCoefficient Data TypeRule
Unlocked'Same as input'The function assumes that the coefficient data type is signed, 16 bit, and autoscaled. The function performs fixed-point analysis based on this assumption.
Unlocked'Custom'The function performs fixed-point analysis based on the setting of the CustomCoefficientsDataType property.
Locked'Same as input'When the input data type is 'double' or 'fixed', the function assumes that the coefficient data type is signed, 16-bit, and autoscaled. The function performs fixed-point analysis based on this assumption.
Locked'Custom'The function performs fixed-point analysis based on the setting of the CustomCoefficientsDataType property.

When you do not specify the arithmetic, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type.

Output Arguments

collapse all

Structure with a single field, Numerator, containing filter coefficients.

Introduced in R2011a