I can't understand sampling signal mathematically.

for example $x(t) = 2\cos(100\pi t) + \cos(300\pi t)$ and I know I should use sampling frequency $300\textrm{Hz}$ to sample this signal.

and after sampling, what is done?

How is $x(t)$ changed? and what frequency does sampled $x(t)$ have?

  • 2
    $\begingroup$ To be precise, a sampling frequency strictly greater than 300Hz should be used. $\endgroup$
    – AlexTP
    Jun 17, 2018 at 13:43
  • $\begingroup$ Could you please mark an answer? $\endgroup$
    – Royi
    Nov 21, 2022 at 18:55

3 Answers 3


This is to explain what actually sampling is and why and how it's done.

Here I've generated a simple continuous-like sinusoidal signal with frequency fm = 10kHz. In order to make it appear as a continuous signal when plotting, a sampling rate of fs=500kHz is used

Simple continuous sinusodial signal

Pretending the above-generated signal as a “continuous” signal, we would like to convert the signal to the discrete-time equivalent by sampling. By Nyquist Shannon Theorem, the signal has to be sampled at at-least fs=2*fm=20 kHz. Let’s sample the signal at f{s1}=30kHz and then at f{s1}=50kHz for illustration.

After sampling with different frequencies


fs=500e3; %Very high sampling rate 500 kHz
f=10e3; %Frequency of sinusoid
nCyl=5; %generate five cycles of sinusoid
t=0:1/fs:nCyl*1/f; %time index

title('Continuous sinusoidal signal');

For Sampling-

fs1=30e3; %30kHz sampling rate
t1=0:1/fs1:nCyl*1/f; %time index

fs2=50e3; %50kHz sampling rate
t2=0:1/fs2:nCyl*1/f; %time index

hold on;
hold on;

and after sampling, what is done?

Well, nothing special, you're just getting another signal in a discrete time domain, based on your original signal in a continual domain.


First pay attention that the Nyquist Shannon Sampling Theorem requires sampling at rate which is strictly larger than twice (Though it is for edge cases, yet this is the accurate theorem).

Sampling is 1 step to get signals to be Discrete, which means we can store them in a digital form.
Sampling is the discretization of the Time Axis and we need to apply Quantization which is discretization of the Value Axis.

Sampling Theorem states that given a sampled signal (Which is a set of the signal values at discretized grid of time samples) what are the cases it can be fully reconstructed given a single property of the signal - Band Limited Signal.

So what's changed?
You don't have the whole signal but only set of samples from it on a time grid.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.