0.7916 -0.4865 1.4400 1.4146 0.3743 -0.0138 1.5991 1.2865 0.5796 1.2719 0.6409 Columns 67 through 77
-0.6321 -0.8411 -0.6352 0.1363 0.9085 -0.7628 1.3540 0.2723 -0.5183 0.8110 0.1863 Columns 78 through 88
-0.2205 0.7783 0.4852 1.1793 1.8274 0.0904 1.5206 -1.3082 1.9190 -0.9142 -0.9907 Columns 89 through 99
1.5030 0.9492 -1.4539 -1.9530 1.5756 -1.2034 -0.8051 0.6458 -0.8624 -0.1231 -1.7409 Column 100 1.9533
5、利用三点滑动平均算法实现信号中噪声的移除: 运行程序:
clf; R=51;
d=0.8*(rand(R,1)-0.5); m=0:R-1;
s=2*m.*(0.9.^m); x=s+d';
subplot(2,1,1);
plot(m,d','r-',m,s,'g--',m,x,'b-.');
xlabel('时间序号n');ylabel('振幅'); legend('d[n] ','s[n] ','x[n] ');
x1=[0 0 x];x2=[0 x 0];x3=[x 0 0]; y=(x1+x2+x3)/3; subplot(2,1,2);
plot(m,y(2:R+1),'r-',m,s,'g--'); legend('y[n] ','s[n] ');
xlabel('时间序号n');ylabel('振幅');
实验结果如图6所示:
10
5
振幅
0-5
时间序号n
86
振幅
420
时间序号n
图6

