Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Manipulating variables

linspace

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

Creates a linearly spaced array.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

x = linspace(min,max,num);

x will be an array with num elements, linearly spaced between min and max. If num is set to 1, then x will be the average of min and max.

 

Examples

?x=linspace(1,3,4);

result: 

1.66667 

2.33333 

3  

 

Call linspace with num of 1. The result with be the average of min and max.

?linspace(1,2,1);

result: 

1.5 

 

See Also

Manipulating variables, :, end, []

Copyright Lumerical Inc. | Privacy | Site Map