Generating a random integer in range in Julia
You can give a range as the first argument to rand, as in rand(1:n): julia> rand(1:10) 7 julia> rand(1:10,10,10) 10×10 Array{Int64,2}: 10 2 5 8 5 5 3 7 1 3 5 1 4 2 4 4 1 6 6 9 8 1 3 9 4 8 7 8 7 10 3 8 1 5 … Read more