Analysis Library Chapter 3
LabWindows/CVI Standard Libraries 3-34 © National Instruments Corporation
Parameters
Input arrayXReal double-precision
array X coordinate.
arrayYImaginary double-precision
array Y coordinate.
numberofElements integer Number of elements.
Output magnitude double-precision
array Magnitude.
phaseRadians double-precision
array Phase (in radians).
Return Value
status integer Refer to error codes in
Table 3-2.
ToRectint status = ToRect (double magnitude, double phaseRadians, double *xReal,
double *yImaginary);
Purpose
Converts the polar coordinates (magnitude, phaseRadians) to rectangular coordinates (xReal,
yImaginary). The formulas used to obtain the rectangular coordinates are as follows.
x = mag * cos(phase)
y = mag * sin(phase)
Parameters
Input magnitude double-precision Magnitude.
phaseRadians double-precision Phase (in radians).
Output xReal double-precision X coordinate.
yImaginary double-precision Y coordinate.