|
TS++ library: time series library
|
| aff::Series<T> ts::convolve | ( | const aff::ConstSeries< T > & | a, |
| const aff::ConstSeries< T > & | b | ||
| ) |
Calculate convolution of two series.
The function evaluates
where the index ranges of the input series are
and
From the second factor we conclude
and thus the index range of
is
For a given
the range of summation index
is defined by the two conditions
and
and
. The result
will be output for
with
samples, thus being longer than either one of the input series. If the convolution filter response is not given completely, but just as a cut-out of the filter response function, the convolution potentially produces a step-response at the end of the filter sequence. This exactly is the behaviour of the convolution integral, if only a cut-out of the originally infinite filter impulse response function is used. If this is missed, the user might be surprised by an unexpected coda in the result of this function. Consider to trim the output sequence to a reasonable sample window to represent a proper cut-out of the expected result.| a | |
| b | |
Definition at line 103 of file convolve.h.
Referenced by main().
