📄 cas_filter.cpp
字号:
/**********************************************
* Filename : cas_filter.CPP *
* Function : realization of FIR filter with *
cas structure *
*Parameter : (h) the coefficients of H(z) *
(z) the inner state variables *
(x) the input data *
(y) the output data *
(n) the number of factors of H(z)*
(m) the number of input data *
**********************************************/
void cas_filter(float h[],float z[],float x[],float y[],int n,int m)
{
int i,j;
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
y[i]=h[3*j]*x[i]+z[2*j];
z[2*j]=h[3*j+1]*x[i]+z[2*j+1];
z[2*j+1]=h[3*j+2]*x[i];
x[i]=y[i];
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -