summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Physikunit.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/Physikunit.pas b/Physikunit.pas
index 736df34..e5057e7 100644
--- a/Physikunit.pas
+++ b/Physikunit.pas
@@ -884,10 +884,10 @@ begin
pruefeArrayEnden('Vorwärts-FFT ('+inttostr(i)+',0) schreibt beim Ausführen über das Ende hinaus!');
for j:=0 to aX div 2 do
- for k:=0 to aP-1 do begin // *i*k*2*pi;
+ for k:=0 to aP-1 do begin // *-i*k*2*pi;
tmp:=(fftTmp+j+k*(aX div 2 + 1))^.re;
- (fftTmp+j+k*(aX div 2 + 1))^.re:=- 2*pi/dX/aX * j * (fftTmp+j+k*(aX div 2 + 1))^.im/aX * byte(2*j<ax);
- (fftTmp+j+k*(aX div 2 + 1))^.im:= 2*pi/dX/aX * j * tmp/aX * byte(2*j<ax);
+ (fftTmp+j+k*(aX div 2 + 1))^.re:= 2*pi/dX/aX * j * (fftTmp+j+k*(aX div 2 + 1))^.im/aX * byte(3*j<aX);
+ (fftTmp+j+k*(aX div 2 + 1))^.im:=- 2*pi/dX/aX * j * tmp/aX * byte(3*j<aX);
end;
fftw_execute(ffts[i,0,true]);
@@ -897,10 +897,10 @@ begin
pruefeArrayEnden('Vorwärts-FFT ('+inttostr(i)+',1) schreibt beim Ausführen über das Ende hinaus!');
for j:=0 to aX-1 do
- for k:=0 to aP div 2 do begin // *i*k*2*pi;
+ for k:=0 to aP div 2 do begin // *-i*k*2*pi;
tmp:=(fftTmp+j+k*aX)^.re;
- (fftTmp+j+k*aX)^.re:=- 2*pi/dP/aP * k * (fftTmp+j+k*aX)^.im/aP * byte(2*k < aP);
- (fftTmp+j+k*aX)^.im:= 2*pi/dP/aP * k * tmp/aP * byte(2*k < aP);
+ (fftTmp+j+k*aX)^.re:= 2*pi/dP/aP * k * (fftTmp+j+k*aX)^.im/aP * byte(3*k < aP);
+ (fftTmp+j+k*aX)^.im:=- 2*pi/dP/aP * k * tmp/aP * byte(3*k < aP);
end;
fftw_execute(ffts[i,1,true]);