Created
February 26, 2023 18:51
-
-
Save slwu89/a54ad60c047fad23741213ce7aa09e97 to your computer and use it in GitHub Desktop.
counting up and down in the most extravagant way possible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MeasureTheory | |
using Plots | |
using Random | |
function counting(x) | |
Dirac([x[1]+1, x[2]-1]) | |
end | |
mc = Chain(x -> counting(x), Dirac([0,0])) | |
r = rand(mc) | |
samp = Iterators.take(r, 1000) | |
plot(transpose(hcat(collect(samp)...))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment