Please enable JavaScript to view this site.

Knowledge Base

Specify matrix element by element.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Command

Description

x = [u11,...,u1N; u21,...,u2N; uM1,...,uMN]

Create an N by M matrix. Columns are separated with semicolons. Elements in a row are separated with commas. The entries can either be scalars or matrices of compatible dimension.

 

 

Examples

 

?x=[1,2;3,4;5,6];

result: 

1 2 

3 4 

5 6

 

?x(1:3,1);

result: 

5   

 

a=matrix(2,2,2); 

a(1,1)=1;

a(2,2)=2;

b=a+1;

?c=[a,b];

result(i,j,1):

1 0 2 1 

0 2 1 3 

 

result(i,j,2):

0 0 1 1 

0 0 1 1 

 

See Also

Manipulating variables, linspace, matrix, Accessing and assigning matrix elements

Copyright Lumerical Inc. | Privacy | Site Map