Documentation

Apply a Finite Impulse Response (FIR) filter. More...

## Modules

fir
C++ interface for Finite Impulse Response.

filter1D
C interface for Impulse Response.

## Detailed Description

Apply a Finite Impulse Response (FIR) filter.

Applies a Finite impulse response filter to an array. This filter is used in digital signal processing and is called finite (as opposed to iir) because the impulse response settles to zero in a fixed number of steps.

The FIR is defined as:

$y_{n-1} = b_0*x_{n-1} + b_1*x_{n-2} + \ldots + b_{nb-1}*x_{n-nb-1}$

array x = randu(5);
// x = 0.3194
// 0.8109
// 0.1541
// 0.4452
// 0.2080
float h_b[] = {0.1,0.2,0.3,0.4,0.5};
array f = fir(5, h_b, x);
// f = 0.0319
// 0.1450
// 0.2734
// 0.4464
// 0.6401