Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Functions

abs

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

Returns the absolute value of a number or matrix.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

out = abs(x);

Returns the absolute value of x.

 

Example

Calculate the absolute value of numbers in an array.

?x=linspace(0, 2+1i,2);

result: 

0+0i 

2+1i 

 

?abs(x);

result: 

2.23607  

 

See Also

Functions, real, imag

Copyright Lumerical Inc. | Privacy | Site Map