problems with my code

1 Ansicht (letzte 30 Tage)
Priscilla Schmitz
Priscilla Schmitz am 28 Mai 2019
Kommentiert: Geoff Hayes am 28 Mai 2019
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 Kommentar
Geoff Hayes
Geoff Hayes am 28 Mai 2019
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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by