Exp 1
Exp 1
Experiment Name
Submitted by Submitted to
Experiment Name:
Objectives
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.
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
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');
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 ;
clear all;
t=-10:1:10;
y= (t == 0);
stem(t+2,y)
grid on
title('Unit impulse signal')
xlabel('n')
ylabel('Amplitute');
clc ;
clear all;
t=-10:1:10;
y= (t == 0);
stem(t-2,y)
grid on
title('Unit impulse signal')
xlabel('n')
ylabel('Amplitute');
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');
In this experiment, Discrete time signals are learned here. MATLAB is used to plot these discrete
signals. The signals are plotted and observed successfully.