t=-10:0.01:10;
A=2;
w=1;
%正弦波
y1=A*sin(w*t);
subplot(3,3,1)
plot(t,y1);
axis([-10 10 -10 10]);
%方波
z=30;
y2=A*square(w*t,z);
subplot(3,3,2)
plot(t,y2);
axis([-10 10 -10 10]);
%三角波
kuan=10;
xie=1;
y3=A*tripuls(w*t,kuan,xie);
subplot(3,3,3)
plot(t,y3);
axis([-10 10 -10 10]);
%锯齿波
y4=A*sawtooth(w*t);
subplot(3,3,4)
plot(t,y4);
axis([-10 10 -10 10]);
%白噪声
y5=randn(1,length(t));
subplot(3,3,5)
plot(t,y5);
axis([-10 10 -10 10]);
%离散正弦波
n=-10:10;
y6=A*sin(w*n);
subplot(3,3,6)
stem(n,y6,'fill');
axis([-5 5 -5 5]);
%单位脉冲
y7=[zeros(1,10),1,zeros(1,10)];
subplot(3,3,7);
stem(n,y7,'fill');
axis([-10 10 -3 3]);
%单位阶跃
y8=[zeros(1,10),ones(1,11)];
subplot(3,3,8);
stem(n,y8,'fill');
axis([-10 10 -3 3]);