From: "Sadik " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Confusion over calculating Fourier transforms
Date: Thu, 3 Dec 2009 02:02:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <hf766s$j2g$>
References: <hf5c3c$1f5$> <hf62d6$k7a$> <hf668t$pak$> <hf6alj$32c$>
Reply-To: "Sadik " <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1259805724 19536 (3 Dec 2009 02:02:04 GMT)
NNTP-Posting-Date: Thu, 3 Dec 2009 02:02:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: comp.soft-sys.matlab:589713

Right, just like Matt J says.

If you look at the formula, you will realize that your max in the spectrum [which occurs at DC] is given mathematically by:

maxSpectrum = X(k=0) = sum(exp(-x.^2))

where x is just like you have defined at the very beginning [-3:0.001:3].

Look at this sum and compare it to


You will see what I mean.