Path: news.mathworks.com!not-for-mail
From: "David " <dave@bigcompany.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: fft sign?
Date: Wed, 30 Apr 2008 18:31:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 42
Message-ID: <fvadt7$e6u$1@fred.mathworks.com>
References: <fv7gge$a1d$1@fred.mathworks.com> <fv9nd5$9oe$1@fred.mathworks.com>
Reply-To: "David " <dave@bigcompany.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1209580263 14558 172.30.248.38 (30 Apr 2008 18:31:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 30 Apr 2008 18:31:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:465993


"h xu" <quabla123@gmx.de> wrote in message <fv9nd5
$9oe$1@fred.mathworks.com>...
> "h xu" <quabla123@gmx.de> wrote in message
> <fv7gge$a1d$1@fred.mathworks.com>...
> > i've written a small and simple script to test the
> > fft-function of matlab that transformates exp
(i*n*pi/xmax *
> > x) from xmin=-xmax to xmax. that should result in a
> > kronecker delta with positive amplitude with value 
1... but
> > for some reason the amplitude is negative for odd 
n,... why
> > is that?
> > 
> > xmin=-5;
> > xmax = 5;
> > 
> > N= 2^8;
> > dx = (xmax-xmin)/N;
> > x = linspace(xmin,xmax,N);
> > 
> > y= exp(3* i*pi/xmax *x);
> > NFFT = 2^nextpow2(N);
> > Y_ = fft(y,NFFT)*dx;
> > q = [0:NFFT-1]/NFFT/dx*xmax*2;
> > Y = Y_(1:NFFT)/dx/NFFT;
> > plot(q,real(Y),'.b') 
> > 
> > 
> 
> 
> hm but i want to transformate functions, that 
transformated
> also have a imaginary part, so what do i need to do, to 
have
> the sign right for every value?

try:
y= -1*exp(3* i*(pi/xmax) *x);

yes, it looks the same on the surface... but it REALLY 
isn't.