How To Do Natural Sampling Using MATLAB Simulink

In previous matlab tutorial post, we have discussed about How to generate sawtooth wave in MATLAB Simulink. Now in this Post-04 of Module-II, We will create a simulation model to do natural sampling.

First of all open new model window, and then drag a sine wave block from sources, pulse generator block from sources, constant block from sources, switch from commonly used blocks and scope from sinks into new model file. Connect all the block as shown in figure-1.

Figure.1 - Simulation model for natural sampling.

In this simulation model, Sine wave is the message signal on which we will perform sampling phenomena. Pulse generator will provide the instructions to switch on and off operation. Constant is used to provide zero value to clip particular portion of the sine wave. Switch is used to provide combination of two input i.e. sine wave and constant. The selection window of pulse generator, sine wave and switch is shown in figure-2.

Figure.2 - Selection window of Pulse generator, sine wave and switch.

Parameters of pulse generator are 2 amplitude, 0.01 second period, 50 % pulse width and 0 second phase delay. Parameters of sine wave are 2 amplitude, 20 rad/sec frequency, 0 radian phase and 1 micro second sampling time. Parameters of switch are 1 threshold and 1 micro second sampling time. Now closing all selection window shown in above figure-2. Run the simulation by clicking on start simulation tab. The output of the scope of the simulation is shown in figure-3.

Figure.3 - Output of the natural sampling simulation

Leave your query about Post-04 of Module-II in below mention comment box.

Video Tutorial:

Natural Sampling Using MATLAB Simulink.


  1. I do not have the option to change the sample time in the switch block. Why?

    1. No Problem, It may depends upon the version of MATLAB.


Powered by Blogger.