How do I sample a function using the metropolis algorithm?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
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 Center 및 File Exchange에서 Condensed Matter & Materials Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!