Sliding window centered at a given point
4 次查看(过去 30 天)
显示 更早的评论
Hi! I have a signal and I need to create a sliding window of known length (let's say x) but it needs to be centered at a given point (y). Can anyone help me? Thanks!
1 个评论
回答(1 个)
Image Analyst
2019-8-24
编辑:Image Analyst
2019-8-24
What are you doing with signal values inside the sliding window? Taking the mean, std, or something custom? If it's some operation/function of your own invention, you can use nlfilter(). Otherwise maybe the family of mov***() might work, for example movmean(), etc. Or there's a variety of built-in functions, like sgolayfilt(), (which fits data in the window to a polynomial), etc.
2 个评论
Image Analyst
2019-8-24
Try movmean(), movstd(), movvar(), movmedian(), stdfilt(), and nlfilt().
For frequency info, try fft(), spectrogram(), periodogram(), and pwelch().
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Estimation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!