Hi,
is there an easy way to copy data from an CNIReal64Vector to a double array?
I tried to use the STL copy algorithm, but the tricky thing is that I have to copy the last element myself. Ugly...
The method gets a pointer to an array : double* autoSpectrum1[]
CNiReal64Vector niAutoSpectrum;
MathError errorNI = CNiMath::AutoPowerSpectrum(timeDataVector, niAutoSpectrum, df, dt);
size = niAutoSpectrum.GetSize();
*autoSpectrum1 = new double[size];
std::copy(&niAutoSpectrum[0], &niAutoSpectrum[size-1], &(*autoSpectrum1)[0]);
(*autoSpectrum1)[size-1] = niAutoSpectrum[size-1];
Any idea?
Thanks
Mario