Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: WARNING: Is there a use for ifft(X,M)?
Date: Sat, 13 Jun 2009 09:32:02 +0000 (UTC)
Organization: Xoran Technologies
Lines: 68
Message-ID: <h0vrmi$2ul$1@fred.mathworks.com>
References: <8c3ffec9-42f0-4ba1-ac3c-f826d56dd963@y7g2000yqa.googlegroups.com> <d3a0827b-8314-41df-a587-dde72f81d97c@t16g2000yqi.googlegroups.com>
Reply-To: <HIDDEN>
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 1244885522 3029 172.30.248.35 (13 Jun 2009 09:32:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 13 Jun 2009 09:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:547141


Greg <heath@alumni.brown.edu> wrote in message <d3a0827b-8314-41df-a587-dde72f81d97c@t16g2000yqi.googlegroups.com>...

> In the spectral interpolation case the same N equally
> spaced measurements of complex temporal data are obtained
> during the time interval [t1:dt:t2]. Again, there is no
> requirement that the data be conjugate symmetric nor
> have a special position with respect to a fixed time
> origin that is independent of the data. The only
> requirement is that the data retain the order in which
> they were measured. Therefore when the temporal data is
> zeropadded to obtain an interpolated spectrum, the zeros
> are naturally appended withinn the time interval
> [t2+dt:dt:t1+(M-1)*dt].

No. Again, this entire debate revolves around your personal notions of when it is and is not relevant to have folded non-Fourier domain data as input to fft().

 If you take the fft of a zero-padded sequence that looks like
 [a b c d e f 0 0 0 0 0,... ],
 then the output will be an approximation to the continuous FT of a continuous signal starting at t=0 and which is zero for negative time.
If that's the continuous signal you are trying to model, then great. 

But now lets extend the discussion to fft2(). For people who work with images,  the non-Fourier domain data  extends over the negative axes as well. The image data I'm trying to transform may be a Gaussian lobe whose peak is in the center of the array. I want its spectrum to be a text book real-valued Gaussian. For this situation, I need to fold the data before passing to fft2(). 

Yes, it's possible to compensate afterward by multiplying by a linear phase factor, but as I explained to you elsewhere, this is computationally unpreferable. And if I want an upsampled spectrum, I will have to zero-pad symmetrically around the lobe before folding. This will lead to a folded input to fft2() in which the padded zeros are not trailing zeros, i.e. it is NOT equivalent to calling fft2(X,Mrows, Ncols).






 

> > Zero-padding the symmetric sequence  [a b c d c b a]
> > results in
> > [a b c d c b a 0 0 0 0 ...]
> > which ruins conjugate symmetry, i.e. b is not the conjugate of 0, etc...
> 
> That is precisely why you should NOT use ifft(X,M)!

And if the sequence in my example represents a time domain sequence it is also precisely why you should NOT use fft(X,M).

 

> > Also, if I want to convolve two spectra X and Y each of
> > length M,
> 
> Do you mean length N (N<M)?

No, I mean I want to linearly convolve 2 length-M sequences.
 
> >this form still has a use
> >
> > fft( ifft(X,M).*ifft(Y,M-1))
> 
> 1. The convolution length should be 2*M-1. However, can't use
> " .* " with different length vectors. Something needs fixing.

OK. Then 

fft( ifft(X,M).*ifft(Y,M)),

The point is that there be enough zero-padding that the cyclic convolution be equivalent to linear convolution.

Anyway, it's a moot point. I can implement the same thing as follows

ifft( fft(X,M).*fft(Y,M)),

The point is that ifft(X,M) is no less useful than fft(X,M).