Message Boards Message Boards

0
|
6512 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How fixed intervals for a moving average: "MovingAverage"?

Posted 9 years ago

I am working with a data set and I need obtain the moving average every few data. How I can fixed intervals in the function "MovingAverage[list, r]" for example every 6 data for obtain the average?

Help plz

POSTED BY: Anahi Olmos
Posted 9 years ago

The documentation seems to state that MovingAverage[list, 6] would do this.

This example seems to show that this gives the correct result when r=3

In[1]:= MovingAverage[{1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4}, 3]

Out[1]= {1, 4/3, 5/3, 2, 7/3, 8/3, 3, 10/3, 11/3, 4}
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract