function b=gaussfiltcoef(SR,fco)
%GAUSSFILTCOEF Return coefficients of Gaussian lowpass filter.
% SR=sampling rate, fco=cutoff (-3dB) freq, both in Hz.
% Coeffs for FIR filter of length L (L always odd) are computed.
% This symmetric FIR filter of length L=2N+1 has delay N/SR seconds.
% Examples of use
% Compute Gaussian filter frequency response for SR=1000, fco=50 Hz:
% freqz(gaussfiltcoef(1000,50),1,256,1000);
% Filter signal X sampled at 5kHz with Gaussian filter with fco=500:
% y=filter(gaussfiltcoef(5000,500),1,X);
% SR, fco are not sanity-checked. WCR 2006-10-11.
b=0;
a=3.011*fco;
N=ceil(0.398*SR/fco); %filter half-width, excluding midpoint
%Width N corresponds to at least +-3 sigma which captures at least 99.75%
%of area under Normal density function. sigma=1/(a*sqrt(2pi)).
L=2*N+1; %full length of FIR filter
for k=-N:N
b(k+N+1)=3.011*(fco/SR)*exp(-pi*(a*k/SR)^2);
end;
%b(k) coeffs computed above will add to almost exactly unity, but not
%quite exact due to finite sampling and truncation at +- 3 sigma.
%Next line adjusts to make coeffs b(k) sum to exactly unity.
b=b/sum(b);
gaussfiltcoef.rar_NOISE_gaus filter
版权申诉
91 浏览量
2022-09-20
16:56:17
上传
评论
收藏 790B RAR 举报
![avatar](https://profile-avatar.csdnimg.cn/c7605ebd585249f1b630f560f4d9ba6f_weixin_42650811.jpg!1)
我虽横行却不霸道
- 粉丝: 77
- 资源: 1万+
最新资源
- rest_0616_yanfengming_01.zip
- python爬取链家网二手房资料
- 1_1_2021级高等数学A2期中试题B.pdf
- numpy-2.0.0-pp39-pypy39-pp73-macosx-14-0-x86-64.whl
- numpy-2.0.0-pp39-pypy39-pp73-macosx-10-9-x86-64.whl
- numpy-2.0.0-cp312-cp312-musllinux-1-2-aarch64.whl
- stm32+DHT11+蜂鸣器+三色灯
- Go语言教程案例&Go语言项目资源&Go语言相关项目案例大全
- python实现期货量化回测系统源码及可视化项目源码+数据集+说明文档(95分以上大作业项目)
- wxBot-master.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)