Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

sphere_to_cart (MathScript RT Module Function)

LabVIEW 2011 MathScript RT Module Help

Edition Date: June 2011

Part Number: 373123B-01

»View Product Info

Owning Class: basic

Requires: MathScript RT Module

Syntax

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

Legacy Name: sph2cart

Description

Converts spherical data into 3D Cartesian data. This function works element-wise for matrices.

Details

Examples

Inputs

Name Description
a Specifies the azimuthal angles, or the angles measured from the x-axis to the data points projected in the xy-plane. a is a matrix.
b Specifies the elevation angles, or the angles measured from the xy-plane to the data points. b is a matrix of the same size as a.
c Specifies the radii. c is a matrix of the same size as a.

Outputs

Name Description
x Returns the x-coordinates. x is a matrix of the same size as a.
y Returns the y-coordinates. y is a matrix of the same size as a.
z Returns the z-coordinates. z is a matrix of the same size as the smallest of a, b, and c.

Details

LabVIEW computes a, b, and c using the following equations:
x = c.*cos(a).*cos(b)
y = c.*sin(a).*cos(b)
z = c.*sin(b)

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 Not characterized

Examples

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

Related Topics

cart_to_sphere


 

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