How do I sample a function using the metropolis algorithm?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
f(x)=exp(-x/lambda)*1/lambda
Write a program to sample f(x) by the Metropolis algorithm. Start from any position you like. Equilibrate the random walk for several hundred steps before collecting samples. After equilibration, divide the random walk into n_mea blocks of n_smpls_per_mea each.
1 comentario
Walter Roberson
el 20 de Oct. de 2017
Presumably you were given a reference to the required algorithm in class or in one of the texts for the class.
Respuestas (0)
Ver también
Categorías
Más información sobre Condensed Matter & Materials Physics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!