SignalProcessing - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Science and Engineering : Signal Processing : Computing Statistics : SignalProcessing/DotProduct

SignalProcessing

 DotProduct
 compute the dot product of two arrays of samples

 Calling Sequence DotProduct(A, B)

Parameters

 A, B - Arrays of real or complex values

Description

 • The DotProduct(A, B) command returns the dot product of the Arrays A and B. This is defined by the expression

${\sum }_{k=1}^{N}{A}_{k}{B}_{k}$

 where $N$ is the number of elements of A and B.
 • Note that the element-wise conjugate is not used, even for complex Arrays.
 • Before the code performing the computation runs, Maple converts each input Array to a hardware datatype, first attempting float[8] and subsequently complex[8], unless it already has one of these datatypes. For this reason, it is most efficient the input Arrays have one of these datatypes beforehand.
 • The Arrays A and B must have the same number of elements.

Thread Safety

 • The SignalProcessing[DotProduct] command is thread-safe as of Maple 17.
 • For more information on thread safety, see index/threadsafe.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $a≔\mathrm{Array}\left(\left[1,2,3,4,5\right],'\mathrm{datatype}'={'\mathrm{float}'}_{8}\right)$
 ${a}{≔}\left[\begin{array}{ccccc}{1.}& {2.}& {3.}& {4.}& {5.}\end{array}\right]$ (1)
 > $b≔\mathrm{Array}\left(\left[5,4,3,2,1\right],'\mathrm{datatype}'={'\mathrm{float}'}_{8}\right)$
 ${b}{≔}\left[\begin{array}{ccccc}{5.}& {4.}& {3.}& {2.}& {1.}\end{array}\right]$ (2)
 > $\mathrm{DotProduct}\left(a,b\right)$
 ${35.}$ (3)

Compatibility

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

 See Also

Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam