n=[0:1:20]
x1=sin(0.5*pi*n)
x2=[zeros(1,5),ones(1,5),zeros(1,11)]
x3=x1.*x2
subplot(2,2,1);
plot(n,x1)
stem(n,x1)
title('x1(n)')
subplot(2,2,2);
plot(n,x2)
stem(n,x2)
title('x2(n)')
subplot(2,2,3);
plot(n,x3)
stem(n,x3)
title('x1(n)*x2(n)')
评论0