close all;
clc;
t=0:1:19;
axis([0,3,0,30]);
y1=ones(1,20); %unit step
subplot(2,2,1);
axis([0,3,0,30]);
plot(t,y1);
title('unit step function');
xlabel(' time ');
ylabel(' unit function ');
y2=ones(1,10); %unit step
subplot(2,2,2);
plot(10:1:19,y2);
title('unit step function');
xlabel(' time ');
ylabel(' unit function ');
y3=2*ones(1,20); %unit step
subplot(2,2,3);
plot(t,y3);
title('unit step function');
xlabel(' time ');
ylabel(' unit function ');
y2=2*ones(1,10); %unit step
subplot(2,2,4);
plot(10:1:19,y2);
title('unit step function');
xlabel(' time ');
ylabel(' unit function ');





0 comments