Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
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$1@fred.mathworks.com>
References: <hf5c3c$1f5$1@fred.mathworks.com> <hf62d6$k7a$1@fred.mathworks.com> <hf668t$pak$1@fred.mathworks.com> <hf6alj$32c$1@fred.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1259805724 19536 172.30.248.35 (3 Dec 2009 02:02:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Dec 2009 02:02:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com 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

max(f)

You will see what I mean.