From: Eric Durant Subject: Re: Basic Question: Why divide FFT by N? Date: 1997/01/18 Message-ID: <32E1A183.C06@execpc.com>#1/1 references: <32E10197.37CD@netcom.ca> to: ls0916@netcom.ca content-type: text/plain; charset=us-ascii organization: Exec-PC BBS Internet - Milwaukee, WI mime-version: 1.0 newsgroups: comp.dsp x-mailer: Mozilla 3.0 (Win95; I) Steve, ls0916@netcom.ca wrote: > I used Matlab to calculate a 32 point FFT of a normal > sin wave. When I got the answer, it gave me 16 (15.99...) > at the fundamental frequency instead of 0.5 which is what > I expected. > I thought and thought, and realized that if I divided 16 by > N, I'd get my 0.5. Why did it give me 16 instead of 0.5? > Do I have to divide every point that Matlab returns by N to > get the "correct" answer, or is this just a convention used > when representing FFTs? It is just a convention (IMO, a bad one, but probably too old to change.). Most "canned" DFTs and FFTs don't divide by N when calculating the coefficients. Most books on the subject don't do the division, either. This is counterintuitive since the magnitudes of the transform grow linearly with the number of samples. I'm not sure *why* they're done this way, though. When I write my own DFTs/FFTs, I always do the divides, but when I use somebody else's code I've always had to do the divides myself. Eric Durant