problems with my code

1 次查看(过去 30 天)
Priscilla Schmitz
Priscilla Schmitz 2019-5-28
Hi,
I am running a monte carlo simulation of 12 runs and the last piece of my code (find below) is suppose to calculate PDF and CDF for the RL_MC_1 outputs. The problem that i am facing is the following:
RL_MC_1 is a matrix 378x12 size so i am expecteing a PDF1 and BCC1 matrices of same size, however i am always getting 378x10 size for these two, not sure what is wrong.
for kk = 1:length(RL_MC_1)
[n1(kk,:),bincenters1(kk,:)] = hist(RL_MC_1(kk,:));
PDF1(kk,:)=n1(kk,:)/length(RL_MC_1(kk,:));
BCC1(kk,:)= cumsum(PDF1(kk,:));
end
  1 个评论
Geoff Hayes
Geoff Hayes 2019-5-28
Priscilla - have you tried putting a breakpoint at the line
PDF1(kk,:)=n1(kk,:)/length(RL_MC_1(kk,:));
to see what the dimensions are for PDF1, n1, and RL_MC_1?

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by