Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
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:

http://www.informatik.fh-wiesbaden.de/~linn/vpdv9900/ortgKorr/kk_theorem.gif

please help.

Thanks
Scorpie
Report
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:
:
: http://www.informatik.fh-wiesbaden.de/~linn/vpdv9900/ortgKorr/kk_theorem.gif
:
: please help.
:
: 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.
Report
Re: Cross-Correlation with FFT Posted by Scorpie on 13 Feb 2004 at 12:10 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
Report
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
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.