## Delphi and Kylix

Moderators: pritaeas
Number of posts: 19051

This Forum Only

Cross-Correlation with FFT Posted by Scorpie on 12 Feb 2004 at 11:06 AM
Hello,

how can i implement the fft in delphi 7?
i have two arrays with lot of numbers -> data.
i would realize this functions:

Thanks
Scorpie
Re: Cross-Correlation with FFT Posted by zibadian on 12 Feb 2004 at 2:30 PM
: Hello,
:
: how can i implement the fft in delphi 7?
: i have two arrays with lot of numbers -> data.
: i would realize this functions:
:
:
:
: Thanks
: Scorpie
:
Here is the code for the A() function, but I won't write all four. You need to figure out the other three.
```function LargeA(n: integer; a: array of double; j: double): double;
var
t: integer;
begin
Result := 0;
for i := 0 to High(a) do
Result := Result + a[t]*exp(-2*j*pi*n*t/Length(a));
end;
```

I've used the same symbols as in the formula, so that shouldn't be a problem.
Re: Cross-Correlation with FFT Posted by Scorpie on 13 Feb 2004 at 12:10 AM

how can i define the "j", with wich value? it is the complex kostant. j=-1.
how can i write the Z(n)=A(n)B*(n)? I know that B*(n)is the "konjugiert komplexe" from B(n), but how can i programming this?

thanks a lot

Scorpie
Re: Cross-Correlation with FFT Posted by zibadian on 13 Feb 2004 at 3:09 AM
: thanks for the fast answer,
:
: how can i define the "j", with wich value? it is the complex kostant. j=-1.
: how can i write the Z(n)=A(n)B*(n)? I know that B*(n)is the "konjugiert komplexe" from B(n), but how can i programming this?
:
: thanks a lot
:
: Scorpie
:
Delphi doesn't know how to handle complex numbers, but if memory serves me well I think you can write the exponent (exp(j)) into a sum of sin and cos with non-complex numbers. Just check with you math books on that. The "konjugiert komplexe" is can be calculated using a formula, but I don't know which (currently no math-books with me). Again this should be in a good math-book. I think it's something with the gaussian elimination method.

## Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic