# polar_to_cart (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: basic

Requires: MathScript RT Module

## Syntax

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

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

Legacy Name: `pol2cart`

## Description

Converts 2D or 3D polar data to Cartesian data. This function works element-wise for matrices.

Details

Examples

## Inputs

Name Description
a Specifies the angles of the polar data. a is a matrix of double-precision, floating-point numbers.
b Specifies the radii of the polar data. b is a matrix of double-precision, floating-point numbers of the same size as a.
c Specifies the heights of the polar data. c is a matrix of double-precision, floating-point numbers of the same size as a.

## Outputs

Name Description
x Returns the x-coordinates of the Cartesian data. x is a matrix of the same size as a.
y Returns the y-coordinates of the Cartesian data. y is a matrix of the same size as a.
z Returns the z-coordinates of the 3D Cartesian data. z is equivalent to c. z is a matrix of the same size as c.

## Details

LabVIEW computes x and y according to the following equations:
x = b.*cos(a).
y = b.*sin(a).

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

## Examples

[X, Y, Z] = polar_to_cart(1, 1, 1)

Not Helpful