# Cross-Correlation with FFT

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

• : 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.
[code]
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;
[/code]
I've used the same symbols as in the formula, so that shouldn't be a problem.
• 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
• : 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.