FIRフィルタの実装3 Circular Buffer
2567 ワード
// 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++){
if((index-i)<0){
ynew = ynew + h[i]*x[index-i+N];
} else {
ynew = ynew + h[i]*x[index-i];
}
}
index = (index+1)%N;
Author And Source
この問題について(FIRフィルタの実装3 Circular Buffer), 我々は、より多くの情報をここで見つけました https://qiita.com/enoshima/items/ac6822b04baadc84954c著者帰属:元の著者の情報は、元の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 .