H
hbaocr
Guest
这里的低通与NUM和用MATLAB(sptool)设计登革过滤代码fsample =宽频1;足球俱乐部= 40Hz;巴特沃斯IIR滤波器
#定义皮阿科斯(-1)
双分子[] =(0.00018321602337,0.000732864093479,0.001099296140218,0.000732864093479,0.00018321602337);
双分母[] =(1,-3.344067837711875,4.238863950884069,-2.409342856586321,0.517478199788041);
代码:
无效CVedothiDlg::Low_pass_filter(双* NUM个,双*登革,双*样本,双data_update,双*输出,无符号整型length_output_data)
(无符号的字符一;示例[4] =样本[3];
样本[3] =样品[2];
样品[2] =样本[1];
样本[1] =样品[0];
样品[0] = data_update;
/ /缓冲输出
为(一= length_output_data,我“0; - )
(
输出[我] =输出[的i - 1];
)/ /输出数据更新
输出[0] = NUM个[0] *样品[0] NUM个[1] *样本[1] NUM个[2] *样品[2] NUM个[3] *样本[3] NUM个[4] *示例[4]旦[1] *输出[1]旦[2] *输出[2]旦[3] *输出[3]旦[4] *输出[4];)
#定义皮阿科斯(-1)
双分子[] =(0.00018321602337,0.000732864093479,0.001099296140218,0.000732864093479,0.00018321602337);
双分母[] =(1,-3.344067837711875,4.238863950884069,-2.409342856586321,0.517478199788041);
代码:
无效CVedothiDlg::Low_pass_filter(双* NUM个,双*登革,双*样本,双data_update,双*输出,无符号整型length_output_data)
(无符号的字符一;示例[4] =样本[3];
样本[3] =样品[2];
样品[2] =样本[1];
样本[1] =样品[0];
样品[0] = data_update;
/ /缓冲输出
为(一= length_output_data,我“0; - )
(
输出[我] =输出[的i - 1];
)/ /输出数据更新
输出[0] = NUM个[0] *样品[0] NUM个[1] *样本[1] NUM个[2] *样品[2] NUM个[3] *样本[3] NUM个[4] *示例[4]旦[1] *输出[1]旦[2] *输出[2]旦[3] *输出[3]旦[4] *输出[4];)