julialangHow to fill an array in JuliaLang?
An array in JuliaLang can be filled using the fill
function.
arr = fill(0, 5)
This will create an array of 5 elements, each element being 0.
fill
: This is the function used to fill an array.0
: This is the value used to fill the array.5
: This is the size of the array.
Helpful links
More of Julialang
- How to sort in JuliaLang?
- How to calculate the mean in JuliaLang?
- How to use the println function in JuliaLang?
- How to test code in JuliaLang?
- How to add a legend to a plot in JuliaLang?
- How to append to an array in JuliaLang?
- How to measure execution time in JuliaLang?
- How to create plots in JuliaLang?
- How to create a histogram in JuliaLang?
- How to install JuliaLang?
See more codes...