MATLAB Answers

Plotting normalised histogram of parameters

조회 수: 1(최근 30일)
Prince Igweze
Prince Igweze 4 Dec 2019
답변: Navya Seelam 9 Dec 2019
How can I plot the normalized histograms for parameter x, which correspond to marginal probability distributions
n = 20000;
x = zeros(n,1);
x(1) = Mint(1);
for j = 1:n-1
x_c = normrnd(x(j),25);
if rand < min(1,normpdf(x_c)/normpdf(x(j)))
x(j+1) = x_c;
else
x(j+1) = x(j);
end
end
Thank you

  댓글 수: 0

로그인 to comment.

답변(1개)

Navya Seelam
Navya Seelam 9 Dec 2019
Hi,
You can use histogram function to plot normalized histograms. To choose the type of normalization you can refer to Normalization section in this link

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by