AnalysisLibErrType ToRect1D (double magnitude[], double phase[], int numberOfElements, double outputReal[], double outputImg[]);
Converts the set of polar coordinate points (magnitude, phase) to a set of rectangular coordinate points (outputReal, outputImg). ToRect1D obtains the
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.
| Input | ||
| Name | Type | Description |
| magnitude | double-precision array | Magnitude of the polar coordinates to convert to rectangular coordinates. |
| phase | double-precision array | Phase, in radians, of the polar coordinates to convert to rectangular coordinates. |
| numberOfElements | integer | Number of elements to convert. |
| Output | ||
| Name | Type | Description |
| outputReal | double-precision array | Real part of the resulting rectangular coordinates. |
| outputImg | double-precision array | Imaginary part of resulting the rectangular coordinates. |
| Name | Type | Description |
| status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |