(User.programs) Item: 274 by _fbaird at hpcvbbs.UUCP Author: [Frank Gregory Baird] Subj: FFT plotting Date: Fri May 03 1991 This is an FFT program taken from Oppenheim and Schafer's Digital Signal Processing. The first argument is a complex 2^n-element vector. The second argument is 1 for a forward FFT, and -1 for a backward (inverse) FFT. Also included is a neat little program PLFFT which plots the magnitudes the results of the FFT program. If the plot doesn't look right, you may need to execute a RESET first. If this doesn't fix all the problems, you may wish to also execute 'X' INDEP first. Alternatively you may add this code { (-6.5,-3.1) (6.5,3.2) X 0 (0,0) BAR Y } 'PPAR' STO # 83h # 40h PDIM before 1 XCOL BARPLOT GRAPH. Example: Enter the 16-element vector (16x1 matrix) then a 1 for a forward FFT [ (1,0) (1,0) (1,0) (1,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) ] 1 The returned result is also a 16-element vector [ (4,0) (3.01366974607,-2.01366974607) (.999999999998,-2.41421356237) (-.248302881332,-1.24830288133) (0,0) (.834089318959,.165910681042) (1,-.41421356237) (.40054381631,-.599456183685) (0,0) (.40054381631,.599456183693) (1,.41421356237) (.834089318956,-.165910681041) (0,0) (-.248302881331,1.24830288133) (.999999999999,2.41421356237) (3.01366974607,2.01366974606) ] Author: Frank G. Baird HP BBS: fbaird Internet:UG0342@applelink.apple.com.