FIRフィルタの実装2 Double Size FIFO Buffer
2822 ワード
// N : number of coefficients
// h(n) : filter coefficients, n = 0,…N-1
// x(n) : stored input data, n = 0,…2N-1
// input sample : variable that contains the newest input sample
// index : variable that contains the current place where the new sample is to be stored
x[index] = input_sample;
// Filter the data
ynew = 0;
for (i=0;i<N;i++){
ynew = ynew + h(i)*x(index-i);
}
index = index + 1;
if (index>=2*N){
for (i=N-2;i>=0;i--){
x[i+N+1] = x[i];
}
index = N-1;
}
Author And Source
この問題について(FIRフィルタの実装2 Double Size FIFO Buffer), 我々は、より多くの情報をここで見つけました https://qiita.com/enoshima/items/64c92c593a92ef7c4068著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .