SignalProcessing - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Signal Processing : Convolution and Correlation Computations : SignalProcessing/Convolution

SignalProcessing

 Convolution
 compute the finite linear convolution of two arrays of samples

 Calling Sequence Convolution(A, B)

Parameters

 A, B - Arrays of real numeric sample values

Options

 • container : Array, predefined Array for holding result

Description

 • The Convolution(A, B) command computes the convolution of the Arrays A and B of length $M$ and $N$ respectively, storing the result in a Array C of length $M+N-1$ and having datatype float, which is then returned.
 • The convolution is defined by the formula

${C}_{k}={\sum }_{i=1}^{k}{A}_{i}{B}_{k-i+1}$

 for each $k$ from $1$ to $M+N-1$, with ${A}_{j}=0$ for $M and ${B}_{j}=0$ for $N.
 • Before the code performing the computation runs, A and B are converted to datatype float if they do not have that datatype already. For this reason, it is most efficient if A and B have this datatype beforehand.
 • If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array of size $M+N-1$ having datatype float.

 • The SignalProcessing[Convolution] command is thread-safe as of Maple 17.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $a≔\mathrm{Array}\left(\left[1,2,3\right],'\mathrm{datatype}'={'\mathrm{float}'}_{8}\right)$
 ${a}{≔}\left[\begin{array}{ccc}{1.}& {2.}& {3.}\end{array}\right]$ (1)
 > $b≔\mathrm{Array}\left(\left[1,-1,1,-1\right],'\mathrm{datatype}'={'\mathrm{float}'}_{8}\right)$
 ${b}{≔}\left[\begin{array}{cccc}{1.}& {-}{1.}& {1.}& {-}{1.}\end{array}\right]$ (2)
 > $\mathrm{Convolution}\left(a,b\right)$
 $\left[\begin{array}{cccccc}{1.}& {1.}& {2.}& {-}{2.}& {1.}& {-}{3.}\end{array}\right]$ (3)
 > $c≔\mathrm{Array}\left(1..\mathrm{numelems}\left(a\right)+\mathrm{numelems}\left(b\right)-1,'\mathrm{datatype}'={'\mathrm{float}'}_{8}\right):$
 > $\mathrm{Convolution}\left(a,b,'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccc}{1.}& {1.}& {2.}& {-}{2.}& {1.}& {-}{3.}\end{array}\right]$ (4)
 > $c$
 $\left[\begin{array}{cccccc}{1.}& {1.}& {2.}& {-}{2.}& {1.}& {-}{3.}\end{array}\right]$ (5)

Compatibility

 • The SignalProcessing[Convolution] command was introduced in Maple 17.
 • For more information on Maple 17 changes, see Updates in Maple 17.