谱图f=15000*(0:1023)/1024;subplot(2,2,1);plot(f,mag_x),title('输入信号频谱图');Y=fft(y,1024);mag_y=abs(Y);f=15000*(0:1023)/1024;subplot(2,2,2);%绘制输出信号频谱图plot(f,mag_y),title('输出信号频谱图');subplot(2,2,3);plot(t,x);title('输入信号');axis([00.01-22]);grid;subplot(2,2,4);plot(t,y);title('输出信号