Cross product of column vectors
w = CL_cross(u,v)
Computes the cross product of column vectors (or matrices or hypermatrices considered as sets of column vectors).
The matrices or hypermatrices are automatically expanded and resized: the dimensions with size 1 are expanded to the maximum size between the 2 matrices (or hypermatrices). However, the sizes for the 1st dimension (number of rows) must be identical and be greater than 3 unless one of the 2 arguments is the empty matrix.
Notes:
- If one of the arguments is [], the result is also [].
Matrix or hypermatrix (NxPx... or Nx1x... etc...) with N: 0 or >= 3.
Matrix or hypermatrix (NxPx... or Nx1x... etc...) with N: 0 or >= 3.
Cross product of u and v (NxPx...)
CNES - DCT/SB
// u and v: matrices u = [[1;0;0], [0;1;0]]; v = [[0;1;0], [0;0;1]]; w = CL_cross(u,v) // u: column vector and v: matrix u = [1;0;0]; v = [[0;1;0], [0;0;1]]; w = CL_cross(u,v) // u: column vector and v: hypermatrix u = [1;1;1]; v = rand(3, 2, 4); w = CL_cross(u,v) |