Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!newsfe06.iad.POSTED!7564ea0f!not-for-mail
From: "Nasser M. Abbasi" <nma@12000.org>
Newsgroups: comp.soft-sys.matlab
References: <hcj73a$b5$1@fred.mathworks.com> <AwaHm.1482$%U3.1017@newsfe21.iad> <a220a52b-a008-4b16-acc7-0656a03275b3@w37g2000prg.googlegroups.com> <d1jHm.3896$Mg.1515@newsfe01.iad> <e605aa13-a63b-4032-8b9d-039cdd5efa7a@b36g2000prf.googlegroups.com>
Subject: Re: About FFT and Even Function
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3598
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-EsetId: 321EA926BF2033396452
X-EsetScannerBuild: 5949
Message-ID: <6blHm.1814$Ce1.866@newsfe06.iad>
NNTP-Posting-Host: ncdeodfefpjopplmihjclpliaacepnnh
X-Complaints-To: abuse@charter.net
X-Trace: emlnjhpjaknjmmohadefjppgkgeilljalmbcpphoflhjhibkncdeodfefpjopplmmgdmmdanmgdmojgmfcoolpmjcopeiahlildolkkeocphpjlegcfagiigecfmnnlofengolcelnpbekad
NNTP-Posting-Date: Sun, 01 Nov 2009 19:19:30 UTC
Date: Sun, 1 Nov 2009 13:19:26 -0600
Xref: news.mathworks.com comp.soft-sys.matlab:581659



"dbd" <dbd@ieee.org> wrote in message 
news:e605aa13-a63b-4032-8b9d-039cdd5efa7a@b36g2000prf.googlegroups.com...
>

> No, Matlab indices start at 1.

Thanks for letting me know that, I'll have to remember that.

>I applied your formula to 1:N-1 because
> it doesn't work for N, but I did fft a set of N values. (These are
> samples of a triangular waveform.)
>
> Anyway, did you mean something like this?
>
>>> fft([0 1 2 3 2 1 0])'
> ans =
>   9.0000
>  -4.5489 + 2.1906i
>   0.1920 - 0.2408i
>  -0.1431 + 0.6270i
>  -0.1431 - 0.6270i
>   0.1920 + 0.2408i
>  -4.5489 - 2.1906i
>>>
>


No, that is not what I mean. In the above, you have N=7, but "my formula" 
said

x(n)=x(N-n)  for n=0..N-1   which means x(7) is not valid part of the 
sequence since 7 is more than 7-1 which is 6. So the sequence should have 
been

x(0)=x(7)   (n=0 case)
x(1)=x(6)   (n=1 case)
x(2)=x(5)   (n=2 case)
x(3)=x(4)   (n=3 case)

So, assume, using your numbers, that  x(0)=0, x(1)=1, x(2)=2, x(3)=3 one 
gets

x(0)=0
x(1)=1
x(2)=2
x(3)=3
x(4)=3
x(5)=2
x(6)=1  and you STOP here, since n goes only up to N-1 whichis 6.

So now the x sequence is  [0,1,2,3,3,2,1]

EDU>> fft([0 1 2 3 3 2 1])

ans =

   12.0000   -5.0489   -0.3080   -0.6431   -0.6431   -0.3080   -5.0489


So, I guess Nasser's formula works after all?  ;)

--Nasser