n=0:49;
A=444.128;
a=50*sqrt(2.0)*pi;
T=1/1000;
w0=50*sqrt(2.0)*pi;
xa=A*exp(-a*n*T).*sin(w0*n*T);
n=0:49;
xb=zeros(1,50);
xb(1)=1;
n=0:49;
xc=zeros(1,50);
for i=1:10
xc(i)=1;
end
ha=xc;
hb=zeros(1,50);
hb(1)=1;hb(2)=2.5;hb(3)=2.5;hb(4)=1;
subplot(3,2,1);
stem(n*T,xb);
title('Xb彷面');
xlabel('t');
ylabel('Xb(t)');
[f,sf]=T2F(n*T,xb)
subplot(3,2,2);
stem(f,abs(sf));
title('Xb叫面');
xlabel('f');
ylabel('|Sxb(f)|');
subplot(3,2,3);
stem(n,hb);
title('hb彷面');
xlabel('n');
ylabel('Hb(n)');
subplot(3,2,4);
[f,sf]=T2F(n*T,hb)
stem(f,abs(sf));
title('hb叫面');
xlabel('f');
ylabel('|Shb(f)|');
y=conv(xb,hb);
subplot(3,2,5);
n=0:98;
stem(n,y);
title('Y彷面');
xlabel('n');
ylabel('Y(n)');
[f,sf]=T2F(n*T,y)
subplot(3,2,6);
stem(f,abs(sf));
title('Y叫面');
xlabel('f');
ylabel('|Sy(f)|');