Fix bug in in CutSample.m that led to wrong number of draws for moment computation (first part of PR #733)

FirstLine actually defined the last line. One needs to 1. Otherwise,
Draws in GetAllPosteriorDraws.m will be (NumberOfDraws+1)*nblck.
time-shift
Stéphane Adjemian (Charybdis) 2014-09-20 11:16:50 +02:00
parent 5f3dd73365
commit bfc9719f05
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
MAX_nruns = ceil(options_.MaxNumberOfBytes/(npar+2)/8);
FirstDraw = max(1,floor(options_.mh_drop*TotalNumberOfMhDraws));
FirstMhFile = ceil(FirstDraw/MAX_nruns);
FirstLine = FirstDraw-(FirstMhFile-1)*MAX_nruns;
FirstLine = FirstDraw-(FirstMhFile-1)*MAX_nruns+1;
record.KeepedDraws.FirstMhFile = FirstMhFile;
record.KeepedDraws.FirstLine = FirstLine;
if (TotalNumberOfMhFiles-1)-(FirstMhFile+1)+1 > 0