Rephrase exercise 3 in notebook julia_basics

This commit is contained in:
Francesc Verdugo
2025-09-05 15:12:46 +02:00
parent 50cb8fff17
commit 388a8d9f5a
2 changed files with 37 additions and 12 deletions

View File

@@ -27,12 +27,17 @@ ex2(f,g) = x -> f(x) + g(x)
### Exercise 3
```julia
using GLMakie
max_iters = 100
n = 1000
x = LinRange(-1.7,0.7,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