How to quickly count the moving average with one vector and save the other 
vector?
I have vec a and need to fill vec b moving average of a, in this same range.
Is posible to do it whitout while ?

julia> a=rand(100);
julia> b=zeros(100);

julia> b[1:10]=mean(a[1:10])
0.6312220153427996

julia> b[11:20]=mean(a[11:20])
0.6356771620528772

julia> b
100-element Array{Float64,1}:
 0.631222
 0.631222
 0.631222
 0.631222
 0.631222
 0.631222
 0.631222
 0.631222
 0.631222
 0.631222
 0.635677
 0.635677
 0.635677
 0.635677
 0.635677
 0.635677
 0.635677
 0.635677
 0.635677
 ?
 0.0


Paul
 0.0

Reply via email to