Admin Production ni-theme
Current Publication

ToRect1D

LabWindows/CVI

ToRect1D

AnalysisLibErrType ToRect1D (double magnitude[], double phaseRadians[], ssize_t numberOfElements, double outputArrayReal[], double outputArrayImaginary[]);

Purpose

Converts the set of polar coordinate points (magnitude, phase) to a set of rectangular coordinate points (outputReal, outputImg). ToRect1D obtains the ith element of the rectangular set using the following formulas:

outputReali = magnitudei × cos(phasei)

outputImgi = magnitudei × sin(phasei)

ToRect1D can perform the operations in place; that is, the input and output arrays can be the same.

Parameters

Input
Name Type Description
magnitude double [] Magnitude of the polar coordinates to convert to rectangular coordinates.
phase_Radians double [] Phase, in radians, of the polar coordinates to convert to rectangular coordinates.
numberOfElements ssize_t Number of elements to convert.
Output
Name Type Description
outputArray_Real double [] Real part of the resulting rectangular coordinates.
outputArray_Imaginary double [] Imaginary part of resulting the rectangular coordinates.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later