Main Content

isfir

Verify if filter System object is FIR

Description

flag = isfir(sysobj) determines whether the filter System object™ is an FIR filter. If the filter is an FIR filter, isfir returns 1.

To determine whether sysobj is an FIR filter, the isfir function inspects if the filter in the transfer function form has a scalar denominator. If it does, it is an FIR filter.

example

Examples

collapse all

Design a Lowpass FIR Filter.

d = fdesign.lowpass;
h = design(d,Systemobject=true)
h = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form'
      NumeratorSource: 'Property'
            Numerator: [-0.0024 -0.0021 0.0068 0.0167 0.0111 -0.0062 -0.0084 0.0093 0.0130 -0.0101 -0.0183 0.0114 0.0262 -0.0125 -0.0380 0.0134 0.0582 -0.0140 -0.1027 0.0145 0.3172 0.4854 0.3172 0.0145 -0.1027 -0.0140 0.0582 0.0134 ... ] (1x43 double)
    InitialConditions: 0

  Use get to show all properties

Determine if the filter is an FIR filter using the isfir function.

isfir(h)
ans = logical
   1

isfir returns 1 to indicate that the filter is an FIR filter.

Output Arguments

collapse all

Flag to determine whether the filter is FIR, returned as a logical scalar. If the filter is FIR, isfir returns a logical 1, else it returns a logical 0.

Data Types: logical

Version History

Introduced in R2011a

expand all