Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Functions

cross

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Calculates the vector cross product of two matrices, which must have the same size. The cross product will be computed on the first dimension that has a size of 3. There must be at least one dimension with a size of 3.

 

Assume that A,B are 2D matrices, where the second dimension contains the vector components. The size of the second dimension must be 3. Then the elements of C will be calculated with the standard cross product formulas.

 

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

C = cross(A, B);

Returns the cross product of A and B

 

Example

Calculate the cross product of (1,1,0) and (0,1,0).

A=[1,1,0];

B=[0,1,0];

?C=cross(A,B);

return: 

0  0  1

 

See Also

Functions, dot, *, length, size

Copyright Lumerical Inc. | Privacy | Site Map