C = cross(A, B)
Bshould be arrays of any number of dimensions.
Bare vectors, they both should have exactly 3 elements.
Cis the cross product of
Bare matrices or arrays having more dimensions, they should have the same sizes, and the first non-singleton dimension should have length 3.
Ccontains cross products of vectors of
Balong the first non-singleton dimension.
C = cross(A, B, dim)
- Same as
C = cross(A,B), except that cross products are computed from vectors of
Btaken from the
dim-th dimension, and that the
dim-th dimensions of
Bshould have exactly 3 elements.