[gforth] / gforth / fft.fs  

gforth: gforth/fft.fs

Diff for /gforth/fft.fs between version 1.2 and 1.5

version 1.2, Sat Dec 31 15:46:08 2005 UTC version 1.5, Mon Dec 31 17:34:58 2007 UTC
Line 1 
Line 1 
 \ fast fourier transform  \ fast fourier transform
   
 \ Copyright (C) 2005 Free Software Foundation, Inc.  \ Copyright (C) 2005,2007 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 70 
Line 70 
   BEGIN  2dup >  WHILE  dup 2* swap fft-step    BEGIN  2dup >  WHILE  dup 2* swap fft-step
   REPEAT  2drop drop ;    REPEAT  2drop drop ;
   
 : normalize ( -- )  #points dup s>f 1/f  : fftscale ( r -- )
   0 DO  I values dup z@ 2 fpick zscale z!  LOOP  fdrop ;    #points 0 DO  I values dup z@ 2 fpick zscale z!  LOOP  fdrop ;
   : normalize ( -- )  #points s>f 1/f  fftscale ;
   
 : fft  ( -- )  #points  true (fft ;  : fft  ( -- )  #points  true (fft ;
 : rfft ( -- )  #points false (fft ;  : rfft ( -- )  #points false (fft ;
   
   : hamming ( -- )  #points 0 DO
           I values dup z@ pi I #points fm*/ fsin f**2 f2* zscale z!
       LOOP ;


Generate output suitable for use with a patch program
Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help