Reply by robert bristow-johnson February 28, 20142014-02-28
On 2/28/14 6:06 PM, Tim Wescott wrote:
> On Thu, 27 Feb 2014 14:14:29 -0500, robert bristow-johnson wrote: > >> On 2/27/14 3:27 AM, Markus Grunwald wrote: >>> Hello to all who answered :) >>> >>> Thank you very much, your Answers were most helpful. The one that I >>> understood easily was clay's "Think of sampling a cosine every multiple >>> of 180 degrees." while the others helped to understand further. >>> >>> And you're right, I got my indexing wrong. >> >> and we understand why. it's not your fault. but i won't say whose >> fault it is. > > It's all our faults. Clearly the indexing should start at 'a' and go > from there.
but neither you nor i have put out a math modeling tool along with a toolbox directed toward signal processing. i don't see how "it's all our faults". -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Tim Wescott February 28, 20142014-02-28
On Thu, 27 Feb 2014 14:14:29 -0500, robert bristow-johnson wrote:

> On 2/27/14 3:27 AM, Markus Grunwald wrote: >> Hello to all who answered :) >> >> Thank you very much, your Answers were most helpful. The one that I >> understood easily was clay's "Think of sampling a cosine every multiple >> of 180 degrees." while the others helped to understand further. >> >> And you're right, I got my indexing wrong. > > and we understand why. it's not your fault. but i won't say whose > fault it is.
It's all our faults. Clearly the indexing should start at 'a' and go from there. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by robert bristow-johnson February 27, 20142014-02-27
On 2/27/14 3:27 AM, Markus Grunwald wrote:
> Hello to all who answered :) > > Thank you very much, your Answers were most helpful. The one that I > understood easily was clay's "Think of sampling a cosine every multiple > of 180 degrees." while the others helped to understand further. > > And you're right, I got my indexing wrong.
and we understand why. it's not your fault. but i won't say whose fault it is. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by robert bristow-johnson February 27, 20142014-02-27
On 2/26/14 10:08 PM, Eric Jacobsen wrote:
> On Wed, 26 Feb 2014 16:07:15 -0600, Tim Wescott > <tim@seemywebsite.really> wrote: > >> On Wed, 26 Feb 2014 21:08:41 +0000, glen herrmannsfeldt wrote: >> >>> Tim Wescott<tim@seemywebsite.really> wrote:
...
>>>> Keep in mind that a[0 ... N/2] = a[N-1 ... N/2]*, where a* denotes the >>>> complex conjugate of a. This (together with knowing that Im(a[0]) == >>>> Im(a [N/2] == 0) reflects the fact that you only put in N non-zero >>>> points (because the N imaginary samples were zero), so you only get out >>>> N unique points. >>> >>> That says why a[N/2] is special, but the OP asked about a[N/2+1]. >>> (Where the first element is a[0].) >> >> We all missed that. >> >> Hey! OP! You meant a[N/2]. Really. a[N/2 + 1] is just the complex >> conjugate of a[N/2 - 1]. Or your indexing is off. Or something. > > I didn't miss it, I added the caveat about "depending on your > coefficient numbering". I didn't point it out because I thought the > only candidate in the region for specialness is the symmetry point, so > I figured it was a typo or a numbering issue.
it's because of MATLAB (or Octave or R or whatever fixed 1-origin indexing in whatever tool). blame it on err, ... MATLAB (Cleve, i won't name names.) jadedly, -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Markus Grunwald February 27, 20142014-02-27
Hello to all who answered :)

Thank you very much, your Answers were most helpful. The one that I 
understood easily was clay's "Think of sampling a cosine every multiple 
of 180 degrees." while the others helped to understand further.

And you're right, I got my indexing wrong.

cu
/me
Reply by Eric Jacobsen February 26, 20142014-02-26
On Wed, 26 Feb 2014 16:07:15 -0600, Tim Wescott
<tim@seemywebsite.really> wrote:

>On Wed, 26 Feb 2014 21:08:41 +0000, glen herrmannsfeldt wrote: > >> Tim Wescott <tim@seemywebsite.really> wrote: >>> On Wed, 26 Feb 2014 08:46:53 +0000, Markus Grunwald wrote: >> >> (snip) >>>> If a is the result of the FFT, there are two "interesting" elements of >>>> a: >> >> (snip) >> >>>> But... It seems that the element at a[N/2+1] is somehow "special", >>>> like a[0]. Its imaginary part seems to be zero in this scenario. >> >> (snip) >>>> Am I wrong? Is a[N/2+1] a "special" value? How's it interpreted? >> >>> What Clay and Eric said about your specific question. It more or less >>> falls out of the fact that the input is real and N is even. >> >>> Keep in mind that a[0 ... N/2] = a[N-1 ... N/2]*, where a* denotes the >>> complex conjugate of a. This (together with knowing that Im(a[0]) == >>> Im(a [N/2] == 0) reflects the fact that you only put in N non-zero >>> points (because the N imaginary samples were zero), so you only get out >>> N unique points. >> >> That says why a[N/2] is special, but the OP asked about a[N/2+1]. >> (Where the first element is a[0].) > >We all missed that. > >Hey! OP! You meant a[N/2]. Really. a[N/2 + 1] is just the complex >conjugate of a[N/2 - 1]. Or your indexing is off. Or something.
I didn't miss it, I added the caveat about "depending on your coefficient numbering". I didn't point it out because I thought the only candidate in the region for specialness is the symmetry point, so I figured it was a typo or a numbering issue.
>-- > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com >
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by Tim Wescott February 26, 20142014-02-26
On Wed, 26 Feb 2014 08:46:53 +0000, Markus Grunwald wrote:

> Hello, > > while working daily with FFTs, I seem to have forgotten some of my > theory :( > > Given: > - the "usual" FFT algorithm that turns N complex samples in time domain > to N complex samples in frequency domain. > > - a real valued input signal (= some sampled data, sampling rate "fa"). > > If a is the result of the FFT, there are two "interesting" elements of > a: > > a[0] : This is the DC part of the signal. That much is clear. Its > imaginary part is zero in our scenario. > > a[1&hellip;N/2] : correspond to the multiples of &Delta;f=fa/N. That's clear, too. > > But... It seems that the element at a[N/2+1] is somehow "special", like > a[0]. Its imaginary part seems to be zero in this scenario. I don't > know, > but it seems it's not the first of the negative frequencies that make up > the rest of the spectrum. > > Am I wrong? Is a[N/2+1] a "special" value? How's it interpreted?
Your indexing is off. See my response to Glen Herrmannsfeldt's response to my response. (Speaking of indexing). If a's indexing starts at 0, then a[N/2] is special, with a zero imaginary part, and what Eric and Clay said holds. If a's indexing starts at 0, then a[N/2 + 1] is only special in that with a real-valued input it equals the complex conjugate of a[N/2 - 1] -- but that holds for any pair a[N/2 + n] vs. a[N/2 - n], 0 <= n <= N/2. If a's indexing starts at 1 (i.e., a[1] = DC), then a[N/2 + 1] is special, and what Eric and Clay said holds with appropriate adjustment of indexes. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by Tim Wescott February 26, 20142014-02-26
On Wed, 26 Feb 2014 21:08:41 +0000, glen herrmannsfeldt wrote:

> Tim Wescott <tim@seemywebsite.really> wrote: >> On Wed, 26 Feb 2014 08:46:53 +0000, Markus Grunwald wrote: > > (snip) >>> If a is the result of the FFT, there are two "interesting" elements of >>> a: > > (snip) > >>> But... It seems that the element at a[N/2+1] is somehow "special", >>> like a[0]. Its imaginary part seems to be zero in this scenario. > > (snip) >>> Am I wrong? Is a[N/2+1] a "special" value? How's it interpreted? > >> What Clay and Eric said about your specific question. It more or less >> falls out of the fact that the input is real and N is even. > >> Keep in mind that a[0 ... N/2] = a[N-1 ... N/2]*, where a* denotes the >> complex conjugate of a. This (together with knowing that Im(a[0]) == >> Im(a [N/2] == 0) reflects the fact that you only put in N non-zero >> points (because the N imaginary samples were zero), so you only get out >> N unique points. > > That says why a[N/2] is special, but the OP asked about a[N/2+1]. > (Where the first element is a[0].)
We all missed that. Hey! OP! You meant a[N/2]. Really. a[N/2 + 1] is just the complex conjugate of a[N/2 - 1]. Or your indexing is off. Or something. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by glen herrmannsfeldt February 26, 20142014-02-26
Tim Wescott <tim@seemywebsite.really> wrote:
> On Wed, 26 Feb 2014 08:46:53 +0000, Markus Grunwald wrote:
(snip)
>> If a is the result of the FFT, there are two "interesting" elements of >> a:
(snip)
>> But... It seems that the element at a[N/2+1] is somehow "special", like >> a[0]. Its imaginary part seems to be zero in this scenario.
(snip)
>> Am I wrong? Is a[N/2+1] a "special" value? How's it interpreted?
> What Clay and Eric said about your specific question. It more or less > falls out of the fact that the input is real and N is even.
> Keep in mind that a[0 ... N/2] = a[N-1 ... N/2]*, where a* denotes the > complex conjugate of a. This (together with knowing that Im(a[0]) == Im(a > [N/2] == 0) reflects the fact that you only put in N non-zero points > (because the N imaginary samples were zero), so you only get out N unique > points.
That says why a[N/2] is special, but the OP asked about a[N/2+1]. (Where the first element is a[0].) -- glen
Reply by Tim Wescott February 26, 20142014-02-26
On Wed, 26 Feb 2014 08:46:53 +0000, Markus Grunwald wrote:

> Hello, > > while working daily with FFTs, I seem to have forgotten some of my > theory :( > > Given: > - the "usual" FFT algorithm that turns N complex samples in time domain > to N complex samples in frequency domain. > > - a real valued input signal (= some sampled data, sampling rate "fa"). > > If a is the result of the FFT, there are two "interesting" elements of > a: > > a[0] : This is the DC part of the signal. That much is clear. Its > imaginary part is zero in our scenario. > > a[1&hellip;N/2] : correspond to the multiples of &Delta;f=fa/N. That's clear, too. > > But... It seems that the element at a[N/2+1] is somehow "special", like > a[0]. Its imaginary part seems to be zero in this scenario. I don't > know, > but it seems it's not the first of the negative frequencies that make up > the rest of the spectrum. > > Am I wrong? Is a[N/2+1] a "special" value? How's it interpreted?
What Clay and Eric said about your specific question. It more or less falls out of the fact that the input is real and N is even. Keep in mind that a[0 ... N/2] = a[N-1 ... N/2]*, where a* denotes the complex conjugate of a. This (together with knowing that Im(a[0]) == Im(a [N/2] == 0) reflects the fact that you only put in N non-zero points (because the N imaginary samples were zero), so you only get out N unique points. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com