This was triggered by the comments in this question.

I'm using this definition of the Shannon-Nyquist theorem (form wikipedia):

If a function x(t) contains no

frequencies higher than B hertz, it is completely determined by giving

its ordinates at a series of points spaced 1/(2B) seconds apart.

I was under the impression that the Nyquist theorem is theoretically true in the following sense: if you decompose a signal into sinusoids, and then sample at 2x the highest frequency sinusoid, you can perfectly reproduce the original signal. This is because there's only one sinusoidal curve that fits all the samples *at or below 1/2 the sampling rate*, and if we're considering the highest frequency component in the original signal, it must be a sinusoid (or else it wouldn't be the highest frequency in the signal).

But others commenting on the question linked above said this only applies to continuous signals. One person elaborated on this as follows:

think about continuous signal reconstruction from discrete-time

values: in theory, every value between two sample instants requires

the sinc sidelobes of all countably infinitely many samples before and

after. That's a bit problematic, especially because we don't know the

future. Assuming periodic repetition is one of the common tricks to

get around that, so that with only a limited amount of past and no

future, we can reasonably sinc-interpolate

I don't really understand this – does it mean that what I said above about the Nyquist theorem is not completely true?

## Best Answer

If the signal can be perfectly decomposed into sinusoids, then by definition, the signal is bandlimited to the frequency of the highest one, and Nyquist applies.

This applies whether the signal is continuous or sampled, as long as we keep our assumptions about the sampling consistent.

If we just have a bunch of uniformly taken samples, and no further information, then we don't have enough information to reconstruct a unique signal from which those samples were taken. We need to make an assumption about which alias was being used. Usually, we make the simplest assumption that the first (or should it be zeroth?) alias was sampled, and the signal has frequencies in the range DC to sample_rate/2.

Often, especially with high IF software defined ratios, a higher alias is sampled, and the signal has frequencies from fs/2 to fs, or even fs to 3fs/2.

If you have a perfect triangle wave, or a square wave, then you have frequencies going to infinity, and your 'if I can decompose ...' condition is false. Once bandlimited, a square or triangle wave looks rounded, and maybe gains overshoots, depending on the group delay of the filter used to remove the high frequency components.