atan2 (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info Download Help (Windows Only)

Owning Class: trigonometric

Requires: MathScript RT Module

c = atan2(z)

c = atan2(y, x)

Description

Computes the arctangent of y/x. This function can compute the arctangent for angles in any of the four quadrants of the x-y plane, whereas the atan function computes the arctangent in only two quadrants.

Examples

Inputs

Name Description
z Specifies a real or complex scalar, vector, or matrix. atan2(z) is equivalent to atan2(real(z), imag(z)).
y Specifies a real or complex scalar, vector, or matrix. If y is a complex matrix, LabVIEW ignores the imaginary part and uses only the real part to compute the arctangent.
x Specifies a real or complex scalar, vector, or matrix. If x is a complex matrix, LabVIEW ignores the imaginary part and uses only the real part to compute the arctangent. x must be the same size as y.

Outputs

Name Description
c Returns the arctangent, in radians, of the elements in x and y. c is a scalar, vector, or matrix of the same size as x and y.

Details

The following table lists the support characteristics of this function.

 Supported in the LabVIEW Run-Time Engine Yes Supported on RT targets Yes Suitable for bounded execution times on RT Yes

C = atan2(3, 4)
C = atan2(3+4i)