Dot
Dot product
Syntax
dot(a, b) |
a and b are vectors of the same size or matrices of the same size |
If a,b are vectors, dot(a,b) returns the scalar product of the vectors a and b. If a, b are matrices, dot(a,b) returns the scalar product along the rows. |
dot(a, b, n) |
a and b are matrices of the same size, n = 1 or 2 |
dot(a,b,1) returns the scalar product along the rows. dot(a,b,1) returns the scalar product along the columns. |
Examples
Input |
Output |
a = [2, 1+i, -1+i, i, 1-i, -1 -i] b = [-3+2i, -5+4i, 1-i, 2i, 4, -2-2i] dot(a, b) |
|
a = [12,5,1,0,4;3,14,8,13,2;7,6,3,9,10] b = [-2,-5,-4,-11,15;3,9,7,-6,-10;0,1,12,2,10] dot(a,b) |
|
a = [12,5,1,0,4;3,14,8,13,2;7,6,3,9,10] b = [-2,-5,-4,-11,15;3,9,7,-6,-10;0,1,12,2,10] dot(a,b,1) |
|
a = [12,5,1,0,4;3,14,8,13,2;7,6,3,9,10] b = [-2,-5,-4,-11,15;3,9,7,-6,-10;0,1,12,2,10] dot(a,b,2) |
See Also
Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation