Convolution with Gaussian filter with fixed resolution for non-uniform data?
6 次查看(过去 30 天)
显示 更早的评论
I have non unifrom data (x,y) (attached, simplified). I need to use gaussin filter of fixed window size with fixed resolution. Finally I have to use convolution of gaussian filtered data with y.
I know how to do for whole data without bothering about resolution,as follows. It works fine.
sigma = std(x);
gaussFilter =gausswin(3*sigma+1)';
a=gaussFilter/sum(gaussFilter);
abx=conv(y,a,'same');
But resolution is very important for my case. When I consider the resolution, I am blanck. I tried like one below (with resolution 0.5) but failed.
sigma = std(x); %fixed window size
xn=zeros(1,ceil(max(x)));
for k=1:0.5:size(xn,2) %gives resolution
gaussFilter(k)=gausswin(3*sigma+1)';
xa(k)=gaussFilter(k)/sum(gaussFilter(k));%normalization
end
abx=conv(y,xa,'same');
It means I use Gaussian filter of fixed window size at all x=1:0.5:end. Another question is that, Can Gausswin be used for non-uniform data?
Thank you so much.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Preprocessing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!