How do I sample a function using the metropolis algorithm?

조회 수: 2 (최근 30일)
Gaëtan Poirier
Gaëtan Poirier 2017년 10월 20일
댓글: Walter Roberson 2017년 10월 20일
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
Walter Roberson
Walter Roberson 2017년 10월 20일
Presumably you were given a reference to the required algorithm in class or in one of the texts for the class.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Condensed Matter & Materials Physics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by