FIR滤波的起始从零开始上升那段有没有办法避免掉?
[img]file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Tencent/Users/465223499/QQ/WinTemp/RichOle/DM8S@Y@GBA(~33LW124$[IE.png[/img]
程序如下:void fir_filter(float b[],float c[])
{ int i,j=0; float sum; float h[21]={ -0.09055792262407, 0.009744804975761, 0.01838867509003, 0.03195961694651, 0.04917012260358, 0.06836127325356, 0.08774901331544, 0.1053433191277, 0.1194310387162, 0.128484986607, 0.1316381457976, 0.128484986607, 0.1194310387162, 0.1053433191277, 0.08774901331544, 0.06836127325356, 0.04917012260358, 0.03195961694651, 0.01838867509003, 0.009744804975761, -0.09055792262407 }; for(i=0;i<300;i++) { sum=0.0; for(j=0;j<21;j++) { if(i >= j) sum+=h[j]*b[i-j]; else ; } c=sum; }
|