0% found this document useful (0 votes)
36 views2 pages

Experiment No:-03: Aim:-Requirement: - Program

The document describes a MATLAB experiment to develop elementary signal function modules for a unit impulse, unit step, unit ramp, and exponential function. The program takes a user-input value, defines the relevant time intervals, and uses an if/else statement to calculate and plot the four signal functions on separate subplots. The output shows the plotted graphs and the experiment is concluded to have executed successfully.

Uploaded by

Abhishek Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

Experiment No:-03: Aim:-Requirement: - Program

The document describes a MATLAB experiment to develop elementary signal function modules for a unit impulse, unit step, unit ramp, and exponential function. The program takes a user-input value, defines the relevant time intervals, and uses an if/else statement to calculate and plot the four signal functions on separate subplots. The output shows the plotted graphs and the experiment is concluded to have executed successfully.

Uploaded by

Abhishek Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DSP’S FILE

EXPERIMENT NO:-03
Aim:-To develop elementary signal function modules for Unit Impulse, Unit Step, Unit
Ramp & Exponential.

Requirement:-PC having MATLAB Software.

Program:-
clc;
clear all;
close all;
a=input('What is your value you want to enter?')
n=-a:1:a;
b=length(n)
for i=1:b
if n(i)==0
UI(i)=1;
US(i)=1;
UR(i)=0;
elseif n(i)>0
UI(i)=0;
US(i)=1;
UR(i)=n(i);
Ex(i)=exp(n(i));
elseif n(i)<0
UI(i)=0;

end
end
subplot(4,2,1)
stem(n,UI);
xlabel('Time')
ylabel('Amplitude')
title('Unit Impulse')
subplot(4,2,2)
stem(n,US);
xlabel('Time')
ylabel('Amplitude')
title('Unit Step')
subplot(4,2,3)
stem(n,UR);
xlabel('Time')
ylabel('Amplitude')
title('Unit Ramp')
subplot(4,2,4)
stem(n,Ex);
xlabel('Time')
ylabel('Amplitude')
title('Exponential')

ABHISHEK CHAUHAN
16BEC1117
DSP’S FILE

Output:-

Result:- Commands were executed and results were observed. Graphs were plotted.

ABHISHEK CHAUHAN
16BEC1117

You might also like