compute the dot product of two lists - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Tables, lists, and sets : ListTools Package : ListTools/DotProduct

ListTools[DotProduct] - compute the dot product of two lists

Calling Sequence

DotProduct(L1, L2)

Parameters

L1, L2

-

lists

Description

• 

The DotProduct(L1, L2) calling sequence computes the real dot product of two lists, L1 and L2, where both lists have equal length.

• 

To find the inner product, use DotProduct(L1, map(conjugate, L2)).

Examples

withListTools:

L:=0.,0.84,0.91,0.14,0.76,0.96,0.28,0.66,0.99,0.41,0.54

L:=0.,0.84,0.91,0.14,0.76,0.96,0.28,0.66,0.99,0.41,0.54

(1)

M:=1.,0.54,0.42,0.99,0.65,0.28,0.96,0.75,0.15,0.91,0.84

M:=1.,0.54,0.42,0.99,0.65,0.28,0.96,0.75,0.15,0.91,0.84

(2)

DotProductL,L

5.0063

(3)

DotProductL,M

0.3162

(4)

See Also

list, ListTools, map, type/list


Download Help Document

Was this information helpful?



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