How to implement an integration filter on arrays?
Pardon me if this is wildly off base, but is this useful?
RecurrenceFilter[{{1, 0, -B}, {A}}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}]
{0, 0, 0, 0, 0, A, 0, A B, 0, A B^2, 0}
From the Wolfram Language documentation:
RecurrenceFilter[{α,β},x]
gives the response $y$ to the causal input $x$ by solving the recurrence equation:$$\alpha_1 y_n + ... \alpha_i y_{n-i} = \beta_1 x_n + ... + \beta_j x_{n-j}$$
for $n$ from $1$ to $Length[x]$, where $i$ is $Length[α]$ and $j$ is $Length[β]$.
rf[n_, p_] :=
RecurrenceFilter[{Append[UnitVector[p, 1], -B], {A}}, UnitVector[n + 6, 6]]
rf[5, 2]
rf[8, 3]
{0, 0, 0, 0, 0, A, 0, A B, 0, A B^2, 0} {0, 0, 0, 0, 0, A, 0, 0, A B, 0, 0, A B^2, 0, 0}
x = ConstantArray[0, 5];
y = ConstantArray[0, 5];
impulse = Join[{1}, ConstantArray[0, 5]];
IntegrationFilter[A_, B_, p_, impulse_, xsart_, ystart_] :=
RecurrenceFilter[
{Join[{1}, Table[0, p - 1], {-B}], {A}},
Join[xsart, impulse],
ystart
];
RecurrenceFilter
ref : http://reference.wolfram.com/language/ref/RecurrenceFilter.html
IntegrationFilter[1, 0, 1, impulse, x, y]
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
IntegrationFilter[1, 1, 1, impulse, x, y]
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1}