1、1、已知信号 ,分别用 FS=5000、1000 对信号进行采样,请画出信tetx10)(号采样后的波形以及频谱fs1=5000;fs2=1000;n=1024;tp=50/1000;t1=-2*pi:1/fs1:2*pi;t2=-2*pi:1/fs2:2*pi;xt1=exp(-1*abs(t1);xw1=fft(xt1,n);xt2=exp(-1*abs(t2);xw2=fft(xt2,n);figure(1);subplot(2,2,1);plot(t1,xt1);subplot(2,2,2);k=0:n-1;wk=2*k/tp; plot(wk,abs(xw1);axis(0,fs1,
2、0,1.2*max(abs(xw1)subplot(2,2,3);plot(t2,xt2);subplot(2,2,4);k=0:n-1;wk=2*k/tp; plot(wk,abs(xw2);axis(0,fs2,0,1.2*max(abs(xw2)2、已知 x(n)=cos(0.48n)+cos(0.52n),n:0-9(1)对信号做 10 点 DFT,并画出信号频谱图(2)为使信号频谱曲线光滑,该对原始信号怎样处理,请画出修改后的频谱图(3)对原始信号做 100 点 DFT,画出信号频谱图比较各图,分析结果t=0:9;xn=cos(0.48*pi*t)+cos(0.52*pi*t);N=
3、length(xn);n=0:N-1;k=n;nk=n*k;wn=exp(-1*j*2*pi/N);wnk=wn.nk;xk=xn*wnk; %10点dft ;figure(2)subplot(3,2,1);plot(t,xn);subplot(3,2,2);stem(n,abs(xk),.);%-t=0:0.1*pi:10*pi;xn=cos(0.48*pi*t)+cos(0.52*pi*t);N=length(xn);n=0:N-1;k=n;nk=n*k;wn=exp(-1*j*2*pi/N);wnk=wn.nk;xk=xn*wnk; subplot(3,2,3);plot(t,xn);s
4、ubplot(3,2,4);stem(n,abs(xk),.);%-t=0:99;xn=cos(0.48*pi*t)+cos(0.52*pi*t);N=length(xn);n=0:N-1;k=n;nk=n*k;wn=exp(-j*2*pi/N);wnk=wn.nk;xk=xn*wnk; %100点dft;subplot(3,2,5);plot(t,xn);subplot(3,2,6);stem(n,abs(xk),.);7、设计一个通带截止频率为 500 Hz -800 Hz,阻带截止频率为 600 Hz -700 Hz,通带内波纹的最大衰减为 0.1 dB,阻带内波纹的最小衰减为 50 d
5、B,采样频率为 2000Hz 的带通椭圆数字滤波器,画出其幅频响应图。figure(3)fpl=500;fpu=800;fsl=600;fsu=700;fs=2000;wp=2*fpl,fpu/fs;ws=2*fsl,fsu/fs;rp=0.1;rs=50;N,wc=ellipord(wp,ws,rp,rs);b,a=ellip(N,rp,rs,wc);freqz(b,a);综合题:人体心电图测量信号在测量的过程中会经常受到工业高频干扰,所以必须经过低通滤波器后,才能判断心脏功能的有用信息。下面是一组实际心电图信号的采样样本,其中存在高频干扰,请通过 MATLAB 程序,以为输入序列,滤除其中
6、的额干扰成分。X(n)=-4,-2,0,-4,-6,-4,-2,-4,-6,-6,-4,-4,-6,-6,-2,6,12,8,0,-16,-38,-60,-84,-90,-66,-32,-4,-2,8,12,12,10,6,6,4,0,0,0,0,0,-2,-2,0,0,-2,-2,-2,-2,0实验内容包括:(1) 绘制原数据图形,(2) 设计巴特沃斯低通滤波器并绘制其幅频响应曲线;(3) 用设计的滤波器对原数据进行滤波(4) 绘制滤波后的数据图figure(4)xn1=-4,-2,0,-4,-6,-4,-2,-4,-6,-6,-4,-4,-6,-6,-2,6;xn2=12,8,0,-16,-38,-60,-84,-90,-66,-32,-4,-2,8,12;xn3=12,10,6,6,4,0,0,0,0,0,-2,-2,0,0,-2,-2,-2,-2,0;xn=xn1,xn2,xn3;m=length(xn);n=0:m-1;wp=pi*0.2;rp=1;ws=pi*0.3;as=15;N,wc=buttord(wp,ws,rp,as,s);b,a=butter(N,wc,s);freqs(b,a);figure(5)subplot(1,2,1);plot(xn);yn=filter(b,a,xn);subplot(1,2,2);plot(yn);