dsp的FIR滤波问题

2019-07-30 15:06发布

void fir_filter(void)
{
        int i,j;
        float sum;
        float x1[932];
        float h[31]={ 0.01492972,0.01096342,0.01458647,0.0186,0.02309,0.0278,0.03268,0.037587,
                    0.0423831,0.04692,0.051058,0.05466,
                    0.057597,0.059775,0.061111,0.061563,
                    0.0611111,0.0597754,0.05759762,0.05466,
                    0.051058,0.0469205,0.04238,0.037587,
                    0.03268,0.0278036,0.02309,0.0186523,
                    0.01458,0.0109634,0.014929,};
        //x2=1;
        for(i=0;i<900;i++)
        {
        x1[i+31]=Output0[i];//为什么程序每次执行到这就一直停着?
        };
        for(i=0;i<932;i++)
        {
                sum=0.0;
                for(j=0;j<31;j++)
                {
                        if(i >= j)
                        sum+=h[j]*x1[i-j];
                        else
                        ;
                }
                Output0[i]=(int16)sum>> 15;
        }

}
x1[i+31]=Output0[i];//为什么程序每次执行到这就一直停着?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
3条回答
dirtwillfly
1楼-- · 2019-07-30 19:30
 精彩回答 2  元偷偷看……
caijianfa55
2楼-- · 2019-07-30 23:16
dirtwillfly 发表于 2014-10-22 17:05
不清楚呢。帮你叫个dsp高手来看看。
@zhangmangui

好像是存储空间不够,这个滤波算法也有点问题
zhangmangui
3楼-- · 2019-07-31 01:27
用的什么处理器啊  
别的代码有多少啊   不至于内存不够吧
不行换个CMD试试

一周热门 更多>