Averages/Simple moving average: Difference between revisions

m
(added MiniScript example)
Line 2,114:
 
=={{header|Julia}}==
<lang julia>using Statistics</lang>
{{works with|Julia|0.6}}
The function wants specified the type of the data in the buffer and, if you want, the limit of the buffer.
<lang julia>function movingaverage(::Type{T} = Float64; lim::Integer = -1) where T<:Real
4,102

edits