Tuesday, 15 May 2012

Write a MATLAB program to generate a discrete time unit sample sequence (take time index value 0 to 20 ). Modify this program to generate the delayed sequence (let delay =10 unit on time axis).




close all;
clc;


t=0:1:19;
y1=ones(1,20); %unit step 
subplot(2,1,1);
stem(t,y1);
title('unit stem function');
xlabel(' time ');
ylabel(' unit function ');


y2=[zeros(1,10) ones(1,10)]; 
subplot(2,1,2);
stem(t,y2);
title('unit stem function');
xlabel(' time ');
ylabel(' unit function ');

0 comments

 
© 2011-2012 ProgrammingBlue
Posts RSS Comments RSS
Back to top