Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

cart2pol (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the basic class.

Syntax

[a, b] = cart2pol(x, y)

[a, b, c] = cart2pol(x, y, z)

Description

Transforms 2D or 3D Cartesian coordinates into polar or cylindrical data, respectively. cart2pol performs an element-wise transformation for matrices.

Details

Examples

Inputs

Name Description
x Specifies the x-coordinates. x is a matrix.
y Specifies the y-coordinates. y is a matrix of the same size as x.
z Specifies the z-coordinates. z is a matrix of the same size as x.

Outputs

Name Description
a Returns the angles of the polar or cylindrical data. a is a matrix of the same size as x.
b Returns the radii of the polar or cylindrical data. b is a matrix of the same size as x.
c Returns the heights of the cylindrical data. c is a matrix of the same size as x.

Details

If you provide 2D coordinates, LabVIEW performs the transformation using the following equations:
a = atan2(y, x)
b = sqrt(x.^2+y.^2)

If you provide 3D coordinates, LabVIEW performs the transformation using the following equations:
a = atan2(y, x)
b = sqrt(x.^2+y.^2)
c = z

Examples

[A, B, C] = cart2pol(1, 1, 1)

Related Topics

pol2cart


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit