Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

using complex numbers/vectors

I am trying to use the CNiMath::FFT(CNiComplexReal64 &x) function. I don't know how to set up the CNiComplexReal64 vector - I have no information on how to format the real and imaginary parts. Any easy example would be sufficient to get going on it. I have a vector of my real values and a vector of imaginary values if that can somehow be converted to the CNiComplexReal64 type. Thanks.
0 Kudos
Message 1 of 2
(3,021 Views)
Hello

Check out the fft example that is installed with Measurement Studio, you can find it under ..\MeasurementStudio\VC\Examples\Analysis\Fft.

The CNiMath::FFT has 2 overloads
static MathError FFT(
CNiComplexReal64Vector& x);

and

static MathError FFT(
CNiReal64Vector& xReal,
CNiReal64Vector& xImag);

You can use the second overload, since you already have the data in that form. Check out the documentation for the CNiReal64Vector for more informtion on its available constructors and properties.

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(3,021 Views)