Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'moving average list question' topicStudent Support Forum > General > Archives > "moving average list question"

Next Comment >Help | Reply To Topic
Author Comment/Response
05/05/12 03:27am

This is a hard question. so im going to make sure im extra clear. it would be great if I could get an explanation and learn so I can make something like this by myself in the future. I am learning mathematica fast, but this question has me stumped for sure!

List={{"a", 1, 14}, {"a", 2, 15}, {"a", 3,16}, {"a", 4, 17}, {"a", 5, 18},{"a",5,19}}

element={"a", 1, 14}




I want to take moving average of position3 and then divide position3 by the dividing the moving average x units forward.

for example, lets say...
length of moving average= 3
offset division= 2

and lets just look at position 3 for clarity.
moving average=> {15,16,17,18}
offset division=> {18/15,19/16}

so since the moving average is 3, two units are automatically taken off the beginning of the moving average list. and since the division needs to offset 2 units forward, this makes the final list smaller yet.

so then my final list needs to be cut down as well

final result: add another position for the movingaverage/offsetdivision

{{"a", 5, 18,18/15},{"a",5,19,19/16}}

I need this function to work for a moving average of x units and an offset division of y units

URL: ,

Subject (listing for 'moving average list question')
Author Date Posted
moving average list question Lily 05/05/12 03:27am
Re: moving average list question Bill Simpson 05/05/12 7:46pm
Re: moving average list question Lily 05/07/12 03:18am
Re: Re: moving average list question Bill Simpson 05/07/12 2:15pm
Next Comment >Help | Reply To Topic