Created
July 23, 2021 23:39
-
-
Save physicshinzui/510e50f46cf9b6dc8e801272e1b6273f to your computer and use it in GitHub Desktop.
Julia: Autocorrelation function of 1D random walk
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 Plots | |
using StatsBase: autocor | |
rw = rand([-1,1],10^2) | |
p1 = plot(rw) | |
acf = autocor(rw) | |
p2 = plot(acf) | |
plot(p1, p2,layout=(2,1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment