Cross

Parent Previous Next

Cross


Cross product



Syntax


cross(a, b)

a and b are 3-elements vectors or matrices of the same size

If a,b are vectors, dot(a,b) returns the cross product of the vectors a and b. If a, b are matrices, dot(a,b) returns the cross product along the rows.

cross(a, b, n)

a and b are matrices which have dimension of length 3 along the preferred dimension specified by n.

n = 1 or 2

dot(a,b,1) returns the cross product along the rows. dot(a,b,2) returns the cross product along the columns.


Examples


Input

Output

a = [2, 1+i, -1+i]

b = [-3+2i, -5+4i, 1-i]

cross(a, b)

a = [12,5,1,0,4;3,14,8,13,2;7,6,3,9,10]

b = [-2,-5,-4,-11,15;3,9,7,-6,-10;0,1,12,2,10]

cross(a,b)  

a = [12,5,1;3,14,8;7,6,3]

b = [-2,-5,-4;3,9,7;0,1,12]

cross(a,b,1)  

a = [12,5,1;3,14,8;7,6,3]

b = [-2,-5,-4;3,9,7;0,1,12]

cross(a,b,2)  


See Also


Created with the Personal Edition of HelpNDoc: Free EPub producer