Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!50g2000hsm.googlegroups.com!not-for-mail
From:  dbd <dbd@ieee.org>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Purely real result of IFFT
Date: Thu, 04 Oct 2007 14:13:49 -0700
Organization: http://groups.google.com
Lines: 62
Message-ID: <1191532429.884856.179980@50g2000hsm.googlegroups.com>
References: <fe346p$8no$1@fred.mathworks.com>
NNTP-Posting-Host: 75.7.227.214
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1191532430 4374 127.0.0.1 (4 Oct 2007 21:13:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 4 Oct 2007 21:13:50 +0000 (UTC)
In-Reply-To: <fe346p$8no$1@fred.mathworks.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: 50g2000hsm.googlegroups.com; posting-host=75.7.227.214;
Xref: news.mathworks.com comp.soft-sys.matlab:431400



On Oct 4, 9:26 am, "David Doria" <daviddo...@gmail.com> 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).
>
> So to do this backwards (i'm trying to create a random
> frequency spectrum that will give a real waveform upon
> taking the ifft), I had to write a function like this:
>
> CN = zeros(1, RandLength);
> CN(1 : RandLength/2) = randn(1, RandLength/2) - j*randn(1,
> RandLength/2);
> CN(RandLength/2 + 1 : RandLength) = conj(CN(RandLength/2 :
> -1 : 1));
>
> However, that didn't work unless i did this:
>
> %force the element (1) and (N/2 + 1) to be real
> CN(1) = randn(1);
> CN(RandLength/2 + 1) = randn(1);
>
> which i found by just seeing what the fft of a small real
> vector was (trial and error i guess you could say).
>
> My question is, why is this not the type of symmetry i am
> used to?
>
> 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
>
> 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)
>
> Any guidance would be greatly appreciated.
>
> Thanks,
>
> David

The issue here is a common difficulty in translating the sense of
symmetry from the continuous domain to the discrete domain. The topic
has a long history. The classic Harris windows paper discusses it and
uses the term "DFT-even" for the result.

The paper is available at:
http://www.eng.vt.edu/me5714/textbook/windows.pdf

The topic is explained on the first and second pages of the paper.

Dale B. Dalrymple
http://dbdimages.com
http://stores.lulu.com/dbd