Path: news.mathworks.com!not-for-mail
From: "Chen Sagiv" <chensagivron@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Does Matlab do FFT correctly ?
Date: Sat, 3 May 2008 04:34:03 +0000 (UTC)
Organization: Sagiv Enterprises
Lines: 57
Message-ID: <fvgpvr$rfa$1@fred.mathworks.com>
References: <fvfs3j$bnf$1@fred.mathworks.com> <fvg2pb$73p$1@fred.mathworks.com>  <da5827de-b6d8-4f66-9943-86aa762b2175@8g2000hse.googlegroups.com>
Reply-To: "Chen Sagiv" <chensagivron@gmail.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 1209789243 28138 172.30.248.38 (3 May 2008 04:34:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 3 May 2008 04:34:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 805005
Xref: news.mathworks.com comp.soft-sys.matlab:466389


Dear Steven,

Thanks for your answer.

Best,

Chen 

"Steven G. Johnson" <stevenj@alum.mit.edu> wrote in message 
<da5827de-b6d8-4f66-9943-
86aa762b2175@8g2000hse.googlegroups.com>...
> On May 2, 6:15 pm, "Chen Sagiv" <chensagiv...@gmail.com> 
wrote:
> > Thanks for your friendly answer.
> > I am wondering what are the implications of your input 
on
> > real life signals and images.
> >
> > I am looking at the Fourier phase of signals and images.
> > Now, when I calculate the fft of say, an images, will I 
get
> > the correct phase, or do I have to do some tricks ?
> 
> Your question is ill-defined, because it depends on what 
you mean by
> "correct".  From a certain point of view, the "correct" 
thing is what
> Matlab does.
> 
> I think you mean, "will I get the phase corresponding to 
the origin at
> the center of the image" and the answer is no, of course: 
you will get
> the phase corresponding to the origin at the corner, 
corresponding to
> the DFT definition, unless you use ifftshift first.
> 
> In real life, in any real application, it is easy to deal 
consistently
> with the origin corresponding to the DFT definition, and 
you are never
> in practice forced to use ifftshift (unless you want 
to).  But, as
> with all thing in numerical calculation, whenever you use 
a black box
> like fft(...), you don't need to know *how* it computes 
what it does
> but you had better understaht *what* it is computing.  To 
do any kind
> of discrete signal processing with FFTs, you have to 
understand the
> DFT and how it differs from the continuous Fourier 
transform.
> 
> Regards,
> Steven G. Johnson