RosettaCodeData/Task/Averages-Simple-moving-average/Mathematica/averages-simple-moving-average-1.math

2 lines
75 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
MA[x_List, r_] := Join[Table[Mean[x[[1;;y]]],{y,r-1}], MovingAverage[x,r]]