How to Plot continuous and discrete time wave sequences in MATLAB.

In digital signal processing, basically we deal with non continuous that is discrete signal. So to perform all digital signal operations like convolution, correlation, filtering, fourier transform, etc we need to know how to compute or observe a continuous signal in discrete form in MATLAB.
In this post I want to share with you a MATLAB program which displays a sinusoidal signal in both domains.

Basically in this program, we have used 2 important commands:

1. plot(x,y) to obtain the graph in Continuous time(CT)
2. stem(x,y) to obtain the graph in Discrete time (DT)

The Matlab program is given below:
`%Computing the graph of wave sequences both in CT and DTclcclear allx=0:1:40;y=10*sin(2*pi*x/15);subplot(2,1,1)plot(x,y) %CTtitle('CT sine wave')gridsubplot(2,1,2)stem(x,y) %DTtitle('DT sine wave')grid` Continous and Discrete sequences output in Matlab

If you have any queries or feedback related to this post, then do comment below and notify me.

#### 1 comment:

1. how it can be done with out using stem

If you liked this blog then Join me at: