Table Of Contents

polar_to_cart

Version:
    Last Modified: December 12, 2016

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

    Syntax

    [x, y] = polar_to_cart(a, b)
    [x, y, z] = polar_to_cart(a, b, c)
    Legacy name: pol2cart

    Inputs

    a

    Angles of the polar data. a is a scalar or an array of any dimension of floating-point or real numbers.

    b

    Radii of the polar data. b is a scalar or an array of any dimension of floating-point or real numbers of the same shape as a.

    c

    Heights of the polar data. c is a scalar or an array of any dimension of floating-point or real numbers of the same shape as a.

    Outputs

    x

    X-coordinates of the Cartesian data. x is an array of the same size as the maximum shape of a, b, and c.

    y

    Y-coordinates of the Cartesian data. y is an array of the same size as the maximum shape of a, b, and c.

    z

    Z-coordinates of the 3D Cartesian data. z is an array of the same size as the maximum shape of a, b, and c.

    Formulas for Calculating X and Y

    MathScript computes x and y according to the following equations:

    x = b.*cos(a)

    y = b.*sin(a)

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

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: DAQExpress does not support FPGA devices


    Recently Viewed Topics