全文预览

matlab数字滤波器设计

上传者:叶子黄了 |  格式:doc  |  页数:12 |  大小:0KB

文档介绍
,-2,-4,-2,0,-2,-4,-4,2,0,0,-2,-4,-2,0,0,-2,-4,-2,0,0,-4,-4,-2,-2,-4,-6,-6,-4,-4,8,-10,-8,-6,-6,-8,-12,-10,-8,-8,-10,-12,-10,-8,-8,-10,-10,-8,-6,-6,-8,-8,-4,-2,-4,-4,-4,0,0,-2,-4,-2,-2,0,-4];РX=fft(x);Рfigure Рstem(abs(X));Рfigure Рplot(x);Рy=filter(b,a,x);Рfigure Рstem(y); Y=fft(y);Рfigure Рstem(abs(Y));РB=fir1(16,wc,rectwin(17));Рfreqz(B,1); z=filter(B,1,x);Рfigure Рstem(z); Z=fft(z);Рfigure Рstem(abs(Z))Р九、实验结论Р滤波前心电信号时域Р滤波前心电信号频域РButterworth滤波器幅频特性曲线РButterworth滤波后心电信号时域РButterworth滤波后心电信号频域РFIR低通滤波器特性曲线РFIR滤波后的时域РFIR滤波后的频域РC语音滤波器代码Р#include<stdio.h>Рfloat filter(int ord, float *a, float *b, int np, float *x, float *y)Р{Р int i,j,n1=0,n2=0;Р int k;Р float sum1=0.0;Р float sum2=0.0;Р for(i=0;i<np;i++)Р { Р for(j=0;j<ord;j++) Р {Р sum1+=(b[j]*x[i]);Р if(i>=1)Р sum2+=(a[j+1]*y[i-1]);Р i--;

收藏

分享

举报
下载此文档