Introduction to Monte Carlo methods
Contents
Introduction to Monte Carlo methods¶
to be written
Application: Monte Carlo in Mannheim¶
tbd
Pkg.add(["FileIO", "ImageMagick", "ImageIO"])
UndefVarError: Pkg not defined
Stacktrace:
[1] top-level scope
@ In[1]:1
[2] eval
@ ./boot.jl:360 [inlined]
[3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1094
using Images, FileIO
img_path = "Mannheim_quadrate.png"
img = load(img_path)
typeof(img)
Matrix{RGBA{N0f8}} (alias for Array{RGBA{Normed{UInt8, 8}}, 2})
size(img)
(2156, 2374)
[234, 1413,1]
3-element Vector{Int64}:
234
1413
1
img[500,500]
using Random
img = rand(5,5)
5×5 Matrix{Float64}:
0.112738 0.883755 0.289751 0.589134 0.717956
0.945748 0.0812687 0.716711 0.7295 0.475783
0.0930118 0.359034 0.14368 0.191692 0.96892
0.413357 0.404343 0.537111 0.0702231 0.370256
0.28802 0.148923 0.432021 0.569693 0.0366185