You are on page 1of 4

Experiment No: 03

Aim: Plot the basic digital signals Digital Impulse, Unit Step, Unit Ramp signals and Exponential function. Program: % % 1) Unit Impulse Function clc; clear all; close all; n=-20:1:20; x=[zeros(1,20),1,zeros(1,20)]; subplot(1,3,1); stem (n,x); title('Unit Impulse Function'); xlabel ('Number'); ylabel ('Amplitude'); %%Unit Step Function y=[zeros(1,20),ones(1,21)]; subplot(1,3,2); stem (n,y); title('Unit Step Function'); xlabel ('Number'); ylabel ('Amplitude'); % % Ramp Function PRADEEP BORSE/09EC004/DSP MANUAL/CGPIT Page 1

r=[zeros(1,20),n(21:41)]; subplot(1,3,3); stem (n,r); title('Unit Ramp Function'); xlabel ('Number'); ylabel ('Amplitude'); figure() % % Exponential Function a=-.5; b=.5; c=-1.5; d=1.5; n=-5:.5:5; e1=(a.^n); e2=(b.^n); e3=(c.^n); e4=(d.^n); subplot(221); stem (n,e1); title('Exponential Function a=.5'); xlabel ('Number'); ylabel ('Amplitude'); subplot(222); stem (n,e2); PRADEEP BORSE/09EC004/DSP MANUAL/CGPIT Page 2

title('Exponential Function b=.5 '); xlabel ('Number'); ylabel ('Amplitude'); subplot(223); stem (n,e3); title('Exponential Function c=-1.5'); xlabel ('Number'); ylabel ('Amplitude'); subplot(224); stem (n,e4); title('Exponential Function d=1.5'); xlabel ('Number'); ylabel ('Amplitude');

PRADEEP BORSE/09EC004/DSP MANUAL/CGPIT

Page 3

Output:

PRADEEP BORSE/09EC004/DSP MANUAL/CGPIT

Page 4

You might also like