FFTC1D changes variables Delphi
Page 1 of 1

Author:  janpdk [ Tue May 23, 2017 2:42 pm ]
Post subject:  FFTC1D changes variables Delphi

I am using procedure FFTC1D in Delphi 7.0.
The problem I have is the following:
this procedure changes variables not being the outputvariable of the procedure.

So executing FFT.FFTC1D(W,N); changes variable Inp!

I am not using explicit pointers nor directive Absolute.

I have seen the procedure FFTC1D is using a lot of Move-functions and I think one of them is done incorrect?!

Please Help.

FF1CD.txt [2.04 KiB]
Downloaded 397 times

Author:  Sergey.Bochkanov [ Wed May 24, 2017 4:49 pm ]
Post subject:  Re: FFTC1D changes variables Delphi

FFTC1D performs inplace conversion of input array. Look, it has no other way of telling about its results except for replacing W.

As for Inp variable - you did not performed true copying of Inp to W, you just copied references. So, W and Inp point to same array.

Author:  janpdk [ Thu May 25, 2017 7:35 am ]
Post subject:  Re: FFTC1D changes variables Delphi

Thank you Sergey, I dit not realize that TComplex1DArray is a pointer.
After reprogramming the module with FFTC1D it is working fine now.

Problem solved.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group