Initial revision
[LeanCalc.git] / help / dp
1 NAME
2     dp - dot product of two vectors
3
4 SYNOPSIS
5     dp(x, y)
6
7 TYPES
8     x, y        1-dimensional matrices of the same size
9
10     return      depends on the nature of the elements of x and y
11
12 DESCRIPTION
13     Compute the dot product of two 1-dimensional matrices.
14
15     Let:
16
17         x = {x0, x1, ... xn}
18         y = {y0, y1, ... yn}
19
20     Then dp(x,y) returns the result of the calculation:
21
22         x0*y0 + x1*y1 + ... + xn*yn
23
24 EXAMPLE
25     > mat x[3] = {2,3,4}
26     > mat y[1:3] = {3,4,5}
27     > print dp(x,y)
28     38
29
30 LIMITS
31     none
32
33 LINK LIBRARY
34     VALUE matdot(MATRIX *x, MATRIX *y)
35
36 SEE ALSO
37     cp
38