|MATLAB Function Reference|
Vector cross product
C = cross(A,B)
returns the cross product of the vectors
B. That is,
C = A x B.
B must be 3-element vectors. If
B are multidimensional arrays,
cross returns the cross product of
B along the first dimension of length 3.
C = cross(A,B,dim)
B are multidimensional arrays, returns the cross product of
B in dimension
B must have the same size, and both
size(B,dim) must be 3.
To perform a dot (scalar) product of two vectors of the same size, use
c = dot(a,b).
The cross and dot products of two vectors are calculated as shown:
© 1994-2005 The MathWorks, Inc.