Accelerating the pace of engineering and science

# dfilt.dfasymfir

Discrete-time, direct-form antisymmetric FIR filter

## Syntax

Hd = dfilt.dfasymfir(b)
Hd = dfilt.dfasymfir

## Description

Hd = dfilt.dfasymfir(b) returns a discrete-time, direct-form, antisymmetric FIR filter, Hd, with numerator coefficients b.

Hd = dfilt.dfasymfir returns a default, discrete-time, direct-form, antisymmetric FIR filter, Hd, with b=1. This filter passes the input through to the output unchanged.

 Note   Only the first half of vector b is used because the second half is assumed to be antisymmetric. In the figure below for an odd number of coefficients, b(3) = 0, b(4) = –b(2) and b(5) =  –b(1), and in the next figure for an even number of coefficients, b(4) = –b(3), b(5) = –b(2), and b(6) = –b(1).

The resulting filter states column vector for the odd number of coefficients example above is

$\left[\begin{array}{c}z\left(1\right)\\ z\left(2\right)\\ z\left(3\right)\\ z\left(4\right)\\ z\left(5\right)\\ z\left(6\right)\end{array}\right]$

## Examples

### Odd Order

Create a Type 4 25th order highpass direct-form antisymmetric FIR filter structure for a dfilt object, Hd, with the following code:

```Num_coeffs = firpm(25,[0 .4 .5 1],[0 0 1 1],'h');
Hd = dfilt.dfasymfir(Num_coeffs);```

### Even Order

Create a 44th order lowpass direct-form antisymmetric FIR differentiator filter structure for a dfilt object, Hd, with the following code:

```Num_coeffs = firpm(44,[0 .3 .4 1],[0 .2 0 0],'differentiator');
Hd = dfilt.dfasymfir(Num_coeffs);```