Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Oesting committed Oct 12, 2023
2 parents 7feadc6 + d5357fe commit 253d470
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions material/3_wed/vis/nb_plutoCummean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ PlutoExtras
# ╔═╡ 49a15661-9511-4da5-9d53-41cd0d140da0
y = simulate(1,nmax);

# ╔═╡ c9824258-0c54-48d6-a7de-76a324535e73
begin
f123,ax123,h = hlines([0.5];xmax=0.7,space=:data)
end

# ╔═╡ f10cad89-cef8-44b5-95b1-497322e83644
CairoMakie.spaces()

# ╔═╡ 006f0413-ca33-44cc-bb70-afbd07728a6d
h.space

# ╔═╡ 0cb700aa-57dd-447e-8d68-5fbb495d55d4
y_mean = sum.(simulate.(1:1000,nmax))./nmax;

Expand Down Expand Up @@ -1719,6 +1730,9 @@ version = "3.5.0+0"
# ╠═4c273ad2-7b68-4384-b909-3419748b5bd3
# ╠═ff47dbb9-3718-4fdd-b366-77bdd5204c32
# ╠═49a15661-9511-4da5-9d53-41cd0d140da0
# ╠═c9824258-0c54-48d6-a7de-76a324535e73
# ╠═f10cad89-cef8-44b5-95b1-497322e83644
# ╠═006f0413-ca33-44cc-bb70-afbd07728a6d
# ╠═0cb700aa-57dd-447e-8d68-5fbb495d55d4
# ╠═4c9f3a84-7988-4e53-8585-e09446b514c8
# ╠═ae3b9284-3c57-488f-84df-0ab038fb4ed0
Expand Down
2 changes: 1 addition & 1 deletion material/3_wed/vis/tasks.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Note that there is no `cummean` function, but clever element-wise division in co
::: {.callout-tip collapse="true"}
## click to show solution

`cumsum(x) ./ 1:length(x)`
`cumsum(x) ./ (1:length(x))`
:::

## 3. Plotting!
Expand Down

0 comments on commit 253d470

Please sign in to comment.