On Nov 3, 1:55 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> all4dsp <all4dsp@n_o_s_p_a_m.comcast.net> wrote:
> > Let's say I compute the FFT magnitude spectrum of a variable X(n) in
> > Matlab, where X(n) has indices n running from 1 to N.
>
> Assuming Matlab works the usual way...
>
> > The magnitude spectrum is plotted for indices n = 2 (ignoring DC index n=1
> > for now) to n = N/2 + 1 (e.g. the Nyquist frequency bin).
> > To get the normalization correct, should the Nyquistfrequency bin's
> > magnitude be cut in half, because the Nyquist bin is not mirrored/reflected
> > like the other bins (except DC bin)?
>
> I don't believe so.
>
> Consider the IFFT with as input all zeros except for the N/2+1 bin.
> Then consider all zeros except for one other bin, other than n=1.
> Compare the results, such as computing the RMS value.
>
> There is some asymmetry in the FFT/IFFT regarding n=1 and n=N/2+1.
boy, isn't it just obvious that MATLAB screwed up the indexing
convention on this? now, in order to speak "Matlab", Glen is
accommodating their dumb and hardwired indexing origin by adding 1 to
everything. it's bad enough we have to do that to communicate to
MATLAB, it's just ridiculous that, for the sake of context, we end up
doing so to communicate to each other.
just a shame.
r bj
