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

6 ビュー (過去 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 Center および File ExchangeData Preprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by