Plot continuous and discrete time wave sequences in MATLAB

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 DT
clear all
plot(x,y) %CT
title('CT sine wave')
stem(x,y) %DT
title('DT sine wave')

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.

Content is copyrighted © www.123mylist.com