Moving Avg calculation

5 visualizzazioni (ultimi 30 giorni)
Jim
Jim il 23 Giu 2011
How does matlab calculate the initial points of a moving average? for example if my timeseries matrix TS is 10x1 and i want 2 and 5 period EMAS then movavg(TS, 2, 5, 'e') will return two 10x1 matrices even though the inital points in theory dont have enough samples to calculate the ema yet.

Risposte (2)

Sean de Wolski
Sean de Wolski il 23 Giu 2011
It's fairly well explained in
doc movavg
I would recommend using conv anyway. example thread
  1 Commento
Jim
Jim il 23 Giu 2011
now sure what you mean by well explained. Doc was first place i checked, and it doesnt seem to go into any detail as far as how its calculated unless im overlooking something?

Accedi per commentare.


Teja Muppirala
Teja Muppirala il 24 Giu 2011
One nice thing about MATLAB is that you can edit a lot of the functions to see what's inside.
edit movavg
The code is well documented so you should be able to see what's going on.

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by