0% found this document useful (0 votes)
15 views9 pages

Exp 1

This document outlines an experiment on the representation of basic discrete time signals using MATLAB R2016a, conducted by a student at Rajshahi University of Engineering & Technology. The objectives include learning discrete signal processing and plotting discrete signals, with various types of signals such as unit step, ramp, and exponential signals discussed. The experiment successfully demonstrates the use of MATLAB for visualizing these discrete signals through provided code examples and plots.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views9 pages

Exp 1

This document outlines an experiment on the representation of basic discrete time signals using MATLAB R2016a, conducted by a student at Rajshahi University of Engineering & Technology. The objectives include learning discrete signal processing and plotting discrete signals, with various types of signals such as unit step, ramp, and exponential signals discussed. The experiment successfully demonstrates the use of MATLAB for visualizing these discrete signals through provided code examples and plots.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

“Heaven’s light is our Guide”

Rajshahi University of Engineering & Technology

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Course Title : Digital Signal Processing Sessional.


Course No : EEE 4108
Experiment No : 01
Name of the Experiment : Representation of basic discrete time signal
using MATLAB R2016a.

Date of Experiment : 08 May, 2024.


Date of Submission : 05 June,2024.

Experiment Name
Submitted by Submitted to

Name : Mostafezur Rahman Md. Nuhi-Alamin

Roll : 1901147 Lecturer

Section :C Department of EEE

Year : 4th year Odd sem Rajshahi University of Engineering &


Technology
Experiment No:01

Experiment Name:

Representation of basic discrete time signal using MATLAB R2016a .

Objectives

• To learn discrete signal processing using MATLAB.


• To learn how to plot discrete signal into MATLAB

Theory:

Discrete-time signals are sequences of values measured at specific time intervals in digital signal
processing. They're used in communication, control systems, and image processing. MATLAB
provides tools to create, manipulate, and visualize these signals.

A discrete-time system models how systems change in discrete steps rather than continuously. It
handles signals defined only at specific times. Each value in a discrete-time signal represents the
signal's amplitude at a particular time. These sequences can be finite or infinite, depending on the
observation period.

There are various type of signal .

➢ Unit step signal


➢ Unit ramp signal
➢ Exponential signal
➢ Unit impulse signal

Matlab functions:

NO Name Operations
1 linspace The linspace command is used to generate a linearly
spaced vector of values within a specified range
2 stem The stem function is used to create a stem plot. A stem
plot is a type of plot where data points are represented as
markers along a vertical stem, typically aligned along a
horizontal axis representing discrete data points.
3 axis Tthe axis command is used to set or query the axis limits
of a plot. It allowsto control the range of values displayed
on the xaxis and y-axis of a plot.
MATLAB code

Unit Step function

clc;
clear all;
t=linspace(-3,5,51);
m=[zeros(1,25),ones(1,26)];
stem(t,m)
axis([-5 5 -1.5 1.5 ])
title('Unit step signal');
xlabel('n');
ylabel('Amplitute');

Fig 1: Plot of unit step signal

Unit ramp function


clc ;
clear all;
t=0:1:10 ;
stem(t,t)
axis([-1 11 -1 13])
title('Ramp signal')
xlabel('n')
ylabel('Amplitute');

Fig 2: Plot of discrete ramp signal

Codes for four figure

clc ; xlabel('n')
clear all; ylabel('Amplitute');
subplot(2,2,1) subplot(2,2,3)
t=0:1:10 ; t=0:1:10 ;
stem((-1)*t,t) stem((-1)*t,(-1)*t)
title('Ramp signal') title('Ramp signal')
xlabel('n') xlabel('n')
ylabel('Amplitute'); ylabel('Amplitute');
subplot(2,2,2) subplot(2,2,4)
t=0:1:10 ; stem(t,-1*t)
stem(t,t) title('Ramp signal')
title('Ramp signal') xlabel('n')
ylabel('Amplitute');
Fig 3: Plot of different ramp signal

Exponential signal

clc
clear all
t=0:.5:10;
y=t.^2; stem(t,y)
title('Exponential signal')
xlabel('n')
ylabel('Amplitute');
Fig 4: Plot of ramp signal

Four figure

clc ; title('Exponential signal')


clear all; xlabel('n')
t=0:.5:10; ylabel('Amplitute');
y=t.^2; subplot(2,2,3)
subplot(2,2,1) stem((-1)*t,(-1)*y)
stem((-1)*t,y) title('Exponentialsignal')
title('Exponential signal') xlabel('n')
xlabel('n') ylabel('Amplitute');
ylabel('Amplitute'); subplot(2,2,4)
subplot(2,2,2) stem(t,(-1)*y)
stem(t,y) title('Exponential signal')
xlabel('n')
ylabel('Amplitute');
Fig 5: Plot of different types of Exponential signal

Code for unit step function (Delay)

clc ;
clear all;
t=-10:1:10;
y= (t == 0);
stem(t+2,y)
grid on
title('Unit impulse signal')
xlabel('n')
ylabel('Amplitute');

Fig 6: Plot of unit step function with delay


Code for Unit step (Advance)

clc ;
clear all;
t=-10:1:10;
y= (t == 0);
stem(t-2,y)
grid on
title('Unit impulse signal')
xlabel('n')
ylabel('Amplitute');

Fig 7: Plot of unit step function in advance

Three types of unit impulse function

clc
clear all;
t=-10:1:10;
y= (t == 0);
subplot(3,1,1)
stem(t,y)
grid on
title('Unit impulse signal')
xlabel('n')
ylabel('Amplitute');
subplot(3,1,2)
stem(t+2,y)
grid on
title('Unit impulse delay signal')
xlabel('n')
ylabel('Amplitute');
subplot(3,1,3)
stem(t-2,y)
grid on
title('Unit impulse advance signal')
xlabel('n')
ylabel('Amplitute');

Fig 8: Plot of three types of unit impulse function

Discussion and conclusion:

In this experiment, Discrete time signals are learned here. MATLAB is used to plot these discrete
signals. The signals are plotted and observed successfully.

You might also like