Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Functions

angle

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

Returns the angle or phase of a complex number or matrix in radians.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

out = angle(x);

Returns the phase of x. The phase is evaluated between -π and π.

 

Example

Calculate the phase of numbers in an array.

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

result: 

0+0i 

2+1i 

 

?angle(x)*180/pi;

result: 

26.5651 

 

See Also

Functions, real, imag, unwrap

Copyright Lumerical Inc. | Privacy | Site Map