# Nyquist-Shannon sampling theorem on non infinite signals

Can we sample and recover signals with non infinite "length" using the nyquist shannon theorem? For example if we have a signal

$$x(t)= u(t+5)-u(t-5)$$ and we know that its sampling period T is less than 10s (T<10). Can we recover it using the nyquist theorem? If not , what could we do to recover it?

Edit: I have taken the fourier transform of this signal and it is : $$X(ω)=2i(\frac{1}{iω}+πδ(ω))sin(5ω)$$ which can lead to finding the period as $$\frac{2π}{5}$$ and actually see that if f>= 5/π it can be recovered. But this may not be possible because i used the theorem although we are on a finite signal

• Seriously, we need an option to flag questions for moving to dsp.stackexchange.com – pipe Jan 20 '18 at 20:41
• @pipe Since the question is related to electronics and to the ideology of this forum , I think it would be wrong if you did that.. – maverick98 Jan 20 '18 at 20:43
• @pipe isn't your question kind of philosophical? I won't continue this here , because my post will be flagged as out of context :P (just from the comments) – maverick98 Jan 20 '18 at 20:48
• "Signals" is everything in electronics. Eventhough we have a different stack exchange for DSP. – Mitu Raj Jan 20 '18 at 20:50

No need to think about "finite length". Even though continuous time signals are defined for infinite time interval, in practice we analyse it in a finite interval only. Your x(t) is defined in the interval [-5 5]. The frequency domain representation of such a signal will be an infinite bandwidth sinc function. Hence it is not possible define a particular sample rate as per nyquist theorem, to perfectly reconstruct it without losing any information. But you can sample it any definite sample rate, which then implicitly band limits the signal. This sampled signal after reconstruction through DAC and LPF, will not look as perfect as the original one as it would be band limited. It will have a finite transition time for rise and fall.

• +1 for clear answer. Given the option, engineers will over sample to extract what they need. – Sparky256 Jan 20 '18 at 21:26
• @MITU RAJ but can we use the theorem to say if we can reconstruct it? or is the theory limited to signals that go from $$-\infty$$ to $$+\infty$$ and not from -5 to 5 like mine? – maverick98 Jan 20 '18 at 21:26
• @Maverick x(t) is time limited [-5 5]. The frequency spectrum of x(t) is still infinite. It doesn't define any maximum frequency for x(t) . Does it ? So can you apply Nyquist sampling theorem and define a sampling rate which will reconstruct x(t) back perfectly ? Nope. – Mitu Raj Jan 20 '18 at 21:36
• Even if x(t) were an infinite periodic signal, we still analyze it in a finite interval in real world. – Mitu Raj Jan 20 '18 at 21:38
• I think you are mixing up time domain and frequency domain. sin 5w means the magnitude of the sine wave at frequency = w in the frequency domain. It is just like plotting sin 5t in time domain. – Mitu Raj Jan 20 '18 at 21:46

A different set of basis functions that are time-bounded would work well. For example, decomposing into Haar wavelets. You get many of the benefits of complex exponential bases for certain kinds of signal processing.

There are sampling theorems for wavelet bases (for example, the Haar wavelet basis can represent many functions within a finite range of "frequencies")

I mention this because it is highly relevant to learn about wavelet signal processing if your signals have finite support in the time dimension. For example, for processing 2 D intensities in a photograph - the sharp edges can be resolved with wavelets, often with far fewer terms.

• Welcome to EE.SE. Your answer should have been in the form of equations to 'proof' it. This is a type of question where words alone are not good enough. – Sparky256 Jan 20 '18 at 23:16