# Is it possible to discretely sample the function

I had a few questions on sampling(I'm quite new witht his), I tried to answer them, I think that I did the first one correct , but not sure about the 2 other: . given the next functions,Is it possible to discretely sample the function? if so what is the maximal allowed distance between the samples? otherwise explain why?

1. $$f(x)=\sin(\alpha x)$$

For this one I said it is possible using Nyquist theorem, assumin $$\alpha =2\pi f$$ and $$T=\frac{1}{f}=\frac{2\pi}{\omega}$$ then the allowed distance is $$\frac{T}{2}=\frac{\pi}{\omega}$$

(hopefully i got this allright).

now from the second question I'm not sure.

1. $$f(x) = \left \{ \begin{array}{cl} 1, & \text{-1\leq x \leq 1} \\ 0, & \text{else} \end{array} \right .$$

for this function I'm pretty sure the answer is it is not possible, since it is a straight line, so I'm not sure.. (please help me with this one).

1. $$f(x)= \mbox{convolution between function of question 1 , function of question 2.}$$

In this case I'm guessing it is possible since its the same as sampling first question function (only that it is sliced).

• One can discretely sample the second one, albeit not in the Nyquist framework – Laurent Duval Oct 3 '18 at 19:18

1. yes, with spacing between samples closer than $$\frac{\pi}{\alpha}$$.
2. no. it's not sufficiently "bandlimited"
3. yes, the convolution of a sinusoid with anything is a sinusoid of the same frequency. so it's "yes" for the same reason as 1.
• Can you please explain what does not sufficiently bandlimited mean? I’m quite new with this , so it would really help me;) also In question 3 it is a sinusoid from -1 to 1, in the rest it’s zero, it’s not an issue? – user2323232 Oct 2 '18 at 20:02
• @robert: thanks for your answer but, when you say "not sufficiently bandlimited", is that the same as saying that there's no periodic component ? – mark leeds Oct 2 '18 at 20:58
• no, i am saying that function of $f(x)$ in 2. (which is three straight lines with two discontinuities) is not bandlimited at all. you can sample it, if you want, but you cannot reconstruct the original from the samples. – robert bristow-johnson Oct 2 '18 at 21:09

Traditional periodic sampling (Nyquist/Shannon) requires band-limited signals. And when signals are band-limited, you get a minimal sampling frequency that is sufficient to preserve all the information, and recover the continuous signal from the discrete samples only.

Your first sine $$x_1$$ is band-limited, so OK for 1). Knowing that a (continuous) convolution of $$x_1$$ and $$x_2$$ in time is equivalent to a product of Fourier transforms, it suffices to know if one of them is band-limited to conclude that the convolution is band-limited as well. So OK for 3) too.

The second case is more interesting. The signal takes two values, 0 and 1. And it changes at times 0 and 1. So this opens the discussion toward discretization in time AND amplitude. And there are non-Nyquist frameworks to discretize such signals: level-crossing, compressive sampling, finite-rate-of-innovation, for instance. Under a model milder than Nyquist/Shannon (eg: for binary signals, being zero at $$-\infty$$, record only times of changes), the second signal can be discretized, with only two values (timings at 0 and 1). And one could discuss whether a sine with irrational quantities could be discretized in values (and I believe, not).

To wrap it up:

1. From a standard teaching perspective, probably positive answers to 1) and 3) are expected
2. From a more advanced one, on time only, 2) is valid too
3. From a complete "discrete" need, only 2) and perhaps 3) as a limiting case
• you're right that practically, if you sample the rectangular pulse enough, a decent practical reconstruction can be made if you don't mind gibbs phenomenon. describing the pulse parametrically with 2 or 3 numbers is not the same as "sampling". – robert bristow-johnson Oct 4 '18 at 7:49
• Let me still believe that 'sampling' means: taking samples, as pairs of $(t,s(t)$ within some discretization or precision. Traditional Nyquist sampling often forget about value discretization, and both are important. – Laurent Duval Oct 6 '18 at 15:40
• yeah, but the issue isn't about amplitude quantization. that's when you get into quantization noise and dithering and noiseshaping. the issue i was trying to simple-mindedly focus on was uniform sampling. so the only thing we know about the $t$-axis is the sampling period $T$. we don't really have ordered pairs of $(t, x(t))$. uniform sampling is $t=nT$ for integer $n$ and we have a single list of values $x(nT)$. – robert bristow-johnson Oct 7 '18 at 3:03