MATLAB Answers

kco
0

smooth function - how many values does it cut off to do a 7 day moving average ?

Asked by kco
on 7 Jul 2016
if I use the smooth function for a 7 day moving average like this:
movingAvg = smooth(adjustedFlowVector,7,'moving');
how many values at the end and the beginning does it cut off?
I ran it on one of my vectors that I also had in excel and I think it cuts off the first 3 values and adds 2 to the end, so if I wanted to graph my moving average vector against dates, I would say
movingAvgtoExcel = movingAvg(1:end-2, :)
and then just graph this against my dates starting with the fourth date since smooth function cuts off the first three values.
are my assumptions correct? Thanks!

  0 Comments

Sign in to comment.

0 Answers