Convolution with Gaussian filter with fixed resolution for non-uniform data?

조회 수: 7 (최근 30일)
Madan Kumar
Madan Kumar 2019년 5월 7일
편집: Madan Kumar 2019년 5월 7일
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개)

카테고리

Help CenterFile Exchange에서 Data Preprocessing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by