Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Purely real result of IFFT
Date: Thu, 04 Oct 2007 13:54:05 -0400
Organization: The MathWorks, Inc.
Lines: 53
Message-ID: <fe39bu$1kr$1@fred.mathworks.com>
References: <fe346p$8no$1@fred.mathworks.com>
NNTP-Posting-Host: vpn-client-123-81-ah.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1191520446 1691 144.212.123.81 (4 Oct 2007 17:54:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 4 Oct 2007 17:54:06 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <HIDDEN>
Xref: news.mathworks.com comp.soft-sys.matlab:431384



David Doria wrote:
> I know that generally if you have a real waveform, the DFT
> is complex symmetric (the -f component is the conjugate of
> the +f component).

I would say that the discrete-time Fourier transform (DTFT) is conjugate 
symmetric such that X(f) = conj(X(-f)).  The discrete Fourier transform 
(DFT) is defined over a discrete sample index from 0 to N-1, so the 
symmetry property is similar but not exactly the same.

 > I would expect for a vector of length 6, that
 > 3,4 are conjugates
 > 2,5 are conjugates
 > 1,6 are conjugates
 >
 > but instead i need
 > 3,5 are conjugates
 > 2,6 are conjugates
 > 1,4 are real

That's not quite correct.

Suppose you have this DFT transform pair:

x[n], 0 <= n <= N-1
X[k], 0 <= k <= N-1

If x[n] is real, then X[k] satisfies this symmetry relationship:

X[k] = conj(X[mod(N-k,N)])

Note that this symmetry relationship implies that X[0] must be real, 
because X[0] = conj(X[mod(N,N)]) = conj(X[0]).

If N is even, it also implies that X[N/2] is real, because X[N/2] = 
conj(X[mod(N - N/2,N)]) = conj(X[mod(N/2,N)]) = conj(X[N/2]).

If we switch to 1-based vector indexing, then the conjugate symmetry 
relationship becomes:

X(k) = conj(X(mod(N-k+1,N)+1)), 1 <= k <= N.

> This is very very important because before I take the ifft,
> i am multiplying with a symmetric, real function, and that
> is producing something that is not symmetric!! (so the my
> ifft is not purely real)

The function you are multiplying with needs to satisfy the symmetry 
condition I described above.

-- 
Steve Eddins
http://blogs.mathworks.com/steve