MATLAB Function Reference |
Syntax
Description
C = dot(A,B)
returns the scalar product of the vectors A
and B
. A
and B
must be vectors of the same length. When A
and B
are both column vectors, dot(A,B)
is the same as A'*B
.
For multidimensional arrays A
and B
, dot
returns the scalar product along the first non-singleton dimension of A
and B
. A
and B
must have the same size.
C = dot(A,B,dim)
returns the scalar product of A
and B
in the dimension dim
.
Examples
The dot product of two vectors is calculated as shown:
See Also
dos | double |
© 1994-2005 The MathWorks, Inc.