FIR
|
Moving averages, summation |
SYNTAX | FIR( array, coefficients, size ) |
RETURNS | ARRAY |
FUNCTION | This function implements general-purpose Finite Impulse Response filter (FIR)
http://en.wikipedia.org/wiki/Finite_impulse_response
The output is convolution of input aray with coefficents table (impulse response table). The function performs automatic normalization of coefficient table if necessary (if its sum is not 1) INPUTS:
It is functional (but 2+ times faster) equivalent of following AFL:
|
EXAMPLE | // for example 5 bar weighted
moving average can be written:
|
SEE ALSO |
The FIR function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.