# Whether it is necessary to consider the Nyquist frequency when constructing the spectrum

I am using fft to plot the signal spectrum (convert real and imaginary components to amplitude values). If my signal is of odd length, I take $$fft[0]$$ as DC and use $$fft[1;(N-1)/2)]$$ values to get the amplitudes of the harmonics (from 1 Hz to (N-1)/2 Hz). But if my signal is of even length, the $$fft$$ element with index $$fft[N/2]$$ represents Nyquist frequency. Is it correct to use this frequency when plotting the amplitudes spectrum? Or in this case I should only consider elements in the range $$fft[1; N/2-1]$$ and DC at $$fft[0]$$?

• It depends on what you are using the results for. As demonstrated in this link: dsp.stackexchange.com/questions/82273/… the Nyquist bin when shared (for even length sequences) can be split (in complex conjugate halves) between the positive and negative spectrum in situations where we need a components at each location, since that spectral location is the same. Commented Feb 7, 2023 at 17:32
• What @DanBoschen said, except that in a lot of circumstances, if you have bins with significant energy in your FFT all the way up to the Nyquist frequency, then that's a strong indication that your real signal was aliased, and those frequency bins aren't valid anyway. Commented Feb 8, 2023 at 15:43
• Yes a most excellent point. What @TimWescott said, for all cases with real signals Commented Feb 8, 2023 at 17:22