Skip to content

Instantly share code, notes, and snippets.

@clementi
Created September 7, 2010 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clementi/568365 to your computer and use it in GitHub Desktop.
Save clementi/568365 to your computer and use it in GitHub Desktop.
def logistic_map(x0, r, n):
if n == 0:
return x0
x_prev = logistic_map(x0, r, n - 1)
return r * x_prev * (1 - x_prev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment