Averages/Simple moving average: Difference between revisions
Content added Content deleted
(added MiniScript example) |
|||
Line 2,114: | Line 2,114: | ||
=={{header|Julia}}== |
=={{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. |
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 |
<lang julia>function movingaverage(::Type{T} = Float64; lim::Integer = -1) where T<:Real |