Sliding window centered at a given point

4 vues (au cours des 30 derniers jours)
Laura petrescu
Laura petrescu le 24 Août 2019
Commenté : Image Analyst le 24 Août 2019
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 commentaire
Adam Danz
Adam Danz le 24 Août 2019
Modifié(e) : Adam Danz le 24 Août 2019

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 24 Août 2019
Modifié(e) : Image Analyst le 24 Août 2019
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 commentaires
Laura petrescu
Laura petrescu le 24 Août 2019
I have to extract some time and frequency features, including std, mean, etc
Image Analyst
Image Analyst le 24 Août 2019
Try movmean(), movstd(), movvar(), movmedian(), stdfilt(), and nlfilt().
For frequency info, try fft(), spectrogram(), periodogram(), and pwelch().

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by