Documentation |
Cross product
C = cross(A,B) returns the cross product of A and B.
If A and B are vectors, then they must have a length of 3.
If A and B are matrices or multidimensional arrays, then they must have the same size. In this case, the cross function treats A and B as collections of three-element vectors. The function calculates the cross product of corresponding vectors along the first array dimension whose size equals 3.