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. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Filter coefficients


s = coeffs(obj)
s = coeffs(obj,Name,Value)


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

s = coeffs(obj,Name,Value) returns filter coefficients for the filter System object obj with additional options specified by one or more Name,Value pair arguments.

Input Arguments

collapse all


Filter System object.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

collapse all

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

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


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


collapse all

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

% Impulse response of the filter
ans =

  Columns 1 through 7

    0.0525         0   -0.0379         0    0.0537         0   -0.0771

  Columns 8 through 14

         0    0.1172         0   -0.2060         0    0.6345    1.0000

  Columns 15 through 21

    0.6345         0   -0.2060         0    0.1172         0   -0.0771

  Columns 22 through 27

         0    0.0537         0   -0.0379         0    0.0525

See Also


Introduced in R2011a

Was this topic helpful?