Moving Average filter window size automatically up-scaled by 1
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Varun Gupta
le 22 Juil 2020
Commenté : Deepak Gupta
le 23 Juil 2020
I implemented a moving average filter using the 'FilterDesigner' with the following features (image attached)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/335382/image.png)
I Specified the window size to be 15. (also created other instances of this filter with window sizes 5,10 and 13)
The group delay for MA is calculated by the formula (N-1)/2 but my group delay curve is plotting N/2 instead. (image attached)
where 'N' is the window size.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/335385/image.jpeg)
Does Matlab automatically upscales the window length by +1? i.e
[(15+1)-1] / 2 = 7.5 instead of 15-1/2 = 7
0 commentaires
Réponse acceptée
Deepak Gupta
le 22 Juil 2020
Hi Varun,
In filterDesigner, you have mentioned filter order as 15 and filter taps or length of filter is order+1. The N generally mentioned in literature is number of taps(filter length), hence N = order+1 = 16.
I hope this clarifies your doubt.
Cheers,
Deepak
4 commentaires
Deepak Gupta
le 23 Juil 2020
As your filter order is 6 hence number of filter taps = 6+1 = 7. You need to look at last 7 samples.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Filter Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!