Filter with variable span

2 次查看(过去 30 天)
Johannes
Johannes 2018-5-29
回答: Johannes 2018-5-29
Hello everybody,
I am in need of a filter with a variable span as my data points (x-values) have non-uniform spacing. I would like to use a moving average filter and/or Savitzky Golay Filter. However, the problem is that the spacing of my x-values is not uniform but decreasing (at least it is monotonously decreasing, but their is no systematic trend). When I use a simple MA or SG filter, I do have the problem that the data in the regions of low point density (large spacing, in the end) is smoothed way too much compared to the data in the beginning (high point density). Thus, I would need a filter function which automatically adjusts to that (diff(x) so to say). A least for the MA filter, I could think of a self-made solution using simple loops. But I guess that's very inefficient and I might not be the first one to seek for such a solution.
Any help is therefore much appreciated.
Thank you very much, Johannes

回答(1 个)

Johannes
Johannes 2018-5-29
Hi Anton, thank you for your answer. I also thought about the same thing. The grid would then have to be as fine as the highest point density I have in my data. However, I was afraid that this might mess with the intrinsic white noise in my data. Or wouldn't you expect this to be a problem? Thanks!

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by