05-15-2008 01:52 PM
05-16-2008 08:34 AM
Hello Irving!
The NIComplexNumber is a typedef that is already declared in the analysis.h library of CVI. Generally speaking is a complex number consisting of a real part and an imaginary part that stores a return value for some functions, for example the PolyRootsEx function.
The definition you can find in the analysis.h file is as follows:
/* Define datatype NIComplexNumber */
#if !defined(_NIComplexNumber)
typedef struct NIComplexNumber_struct {
double real;
double imaginary;
} NIComplexNumber;
#define _NIComplexNumber
#endif
#define ComplexNum NIComplexNumber
A typedef basically lets you hide the real type of the data and use a different type to make it easier. In the previous case a complex number, which contains a real part and an imaginary part, is declared. To use this data type with no problem just include the analysis.h header file as a library to use in your source code.
For more information about typedef this link can help you:
http://en.wikipedia.org/wiki/Typedef
Have a great day!! 🙂
Oswald Branford