Skip to content

Instantly share code, notes, and snippets.

@drsnyder
Created March 4, 2013 05:46
Show Gist options
  • Save drsnyder/5080216 to your computer and use it in GitHub Desktop.
Save drsnyder/5080216 to your computer and use it in GitHub Desktop.
Gibbs or Boltzmann distribution plot in R.
boltzmann <- function(x, t=0.1) { exp(x/t) / sum(exp(x/t)) }
x=rnorm(10,mean=1,sd=0.5)
plot(boltzmann(x))
lines(boltzmann(x))
@aripiana
Copy link

What represents t?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment