home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / lang / basic / 842 < prev    next >
Encoding:
Text File  |  1992-11-16  |  1.3 KB  |  42 lines

  1. Newsgroups: alt.lang.basic
  2. Path: sparky!uunet!caen!destroyer!news.iastate.edu!kwj
  3. From: kwj@iastate.edu (kwj)
  4. Subject: Re: Discrete FFT in basic
  5. Message-ID: <BxtIB1.3n4@news.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames, IA
  8. References: <BxsM4w.EM3@ns1.nodak.edu>
  9. Distribution: na
  10. Date: Mon, 16 Nov 1992 16:40:10 GMT
  11. Lines: 29
  12.  
  13.  
  14. An *excellent* book for numerical analyses is
  15.  
  16.         Press, W.H., Flannery, B.P., Teukolsky, S.A., and Vetterling,W.T.
  17.         (1989).  Numerical Recipes:  The Art of Scientific Computing,
  18.         Cambridge Unversity Press.
  19.  
  20. I use the FORTRAN version, which can easily be translated into BASIC.  I
  21. believe that a BASIC version has been published, but I have not looked at
  22. it yet.
  23.  
  24. Note:   Since the FFT is a convoluted (pun intended) algorithm, many 
  25.         algorithms have errors in them, including the one in Numerical
  26.         Recipes.  If you use the FORTRAN version, the algorithm has the
  27.         line
  28.  
  29.                 WPI = DSIN(THETA)
  30.  
  31.         This should be 
  32.  
  33.                 WPI = -DSIN(THETA)
  34.  
  35.         This error will give you problems if you have a complex data set.
  36.  
  37.         I will post an algorithm that I wrote for a real (not complex) data
  38.         set.  The algorithm is based on that by Press et al.
  39.  
  40.   kwj
  41.  
  42.