Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Exercise 1 Write a MATLAB program for generation and plot of following basic signals over indicated
- interval
- • Unit impulse
- δ[n], −5 ≤ n ≤ 5
- • Unit step
- u[n], −5 ≤ n ≤ 7
- Use stem to create your plots, and be sure to appropriately label your axes.
- code
- clc
- close all
- clear all
- n=-5:1:5;
- y=[ones(1,5),zeros(1,1),ones(1,5)];
- subplot(1,3,1)
- stem(n,y)
- hold on
- xlabel('n')
- ylabel('\delta[n]')
- title('Discrete-time unit impulse function ARHAN SHEKHAR')
- x=-5:1:5;
- t=[zeros(1,5),ones(1,1),zeros(1,5)];
- subplot(1,3,2)
- stem(x,t)
- hold on
- z=-5:1:5;
- r=[zeros(1,5),1,ones(1,5)];
- subplot(1,3,3)
- stem(z,r)
Add Comment
Please, Sign In to add comment