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

2 lines
75 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
MA[x_List, r_] := Join[Table[Mean[x[[1;;y]]],{y,r-1}], MovingAverage[x,r]]