help-octave
[Top][All Lists]

## Re: A question on fftshift

 From: Roberto Hernandez Subject: Re: A question on fftshift Date: Sun, 21 Jul 2002 20:16:04 -0300 User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530

```Steve M. Robbins wrote:
```
```is that the frequency interval for the FFT output is [-fc,fc] where fc
is the critical (Nyquist) frequency.
```
```
For an odd number of samples. Otherwise it's [-fc, fc - 1(N*Dt)].
```
```
No, the samples are equally-spaced around the unit circle, with a
sample always at angle zero.  So you'll only get a sample halfway
around (at frequency +/- fc) if N is even.
```
```
```
You're right, but that's not what I was referring to. If you have an even number of samples then the FFT output bins will not be on a symmetrical frequency interval [-fc, fc], rather [-fc, fc - 1/(N*Dt)] where fc=fs/2. OTOH, if N is odd, the frequency interval will be symmetrical: [-fa, fa] where fa=(N-1)*fs/(2*N).
```
Thanks for the patch.

Regards,
Roberto

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```