ToPolar1D
AnalysisLibErrType ToPolar1D (double arrayXReal[], double arrayXImaginary[], ssize_t numberOfElements, double magnitude[], double phaseRadians[]);
Purpose
Converts the set of rectangular coordinate points (arrayXReal, arrayXImaginary) to a set of polar coordinate points (magnitude, phaseRadians). ToPolar1D obtains the ith element of the polar coordinate set using the following formulas:


The phaseRadians value is in the range [–π : π].
ToPolar1D can perform the operations in place; that is, the input and output arrays can be the same.
Parameters
Input | ||
Name | Type | Description |
arrayX_Real | double [] | Real part of the rectangular coordinates to convert to polar coordinates. |
arrayX_Imaginary | double [] | Imaginary part of the rectangular coordinates to convert to polar coordinates. |
numberOfElements | ssize_t | Number of elements to convert. |
Output | ||
Name | Type | Description |
magnitude | double [] | Magnitude of the resulting polar coordinates. |
phase_Radians | double [] | Phase, in radians, of the resulting polar coordinates. phaseRadians values are in the range the range [–π : π]. |
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