mirror of
https://github.com/fverdugo/XM_40017.git
synced 2025-11-24 09:24:32 +01:00
Merge pull request #69 from fverdugo/2025-26
Rephrase exercise 3 in notebook julia_basics
This commit is contained in:
@@ -27,12 +27,17 @@ ex2(f,g) = x -> f(x) + g(x)
|
|||||||
### Exercise 3
|
### Exercise 3
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
using GLMakie
|
|
||||||
max_iters = 100
|
|
||||||
n = 1000
|
n = 1000
|
||||||
x = LinRange(-1.7,0.7,n)
|
x = LinRange(-1.7,0.7,n)
|
||||||
y = LinRange(-1.2,1.2,n)
|
y = LinRange(-1.2,1.2,n)
|
||||||
heatmap(x,y,(i,j)->mandel(i,j,max_iters))
|
values = zeros(n,n)
|
||||||
|
for j in 1:n
|
||||||
|
for i in 1:n
|
||||||
|
values[i,j] = surprise(x[i],y[j])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
using GLMakie
|
||||||
|
heatmap(x,y,values)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Asynchronous programming in Julia
|
## Asynchronous programming in Julia
|
||||||
|
|||||||
7324
notebooks/figures/mandel.svg
Normal file
7324
notebooks/figures/mandel.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 440 KiB |
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user