GetPosteriorMeanVariance.m: fix bug when number of dropped draws coincided with number of draws in file

In this case, the reported results were NaN
time-shift
Johannes Pfeifer 2016-10-03 22:34:47 +02:00
parent b4e2f38b6c
commit b2984f43c9
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ function [mean,variance] = GetPosteriorMeanVariance(M,drop)
for j=1:NbrFiles
o = load([BaseName '_mh' int2str(j) '_blck' int2str(i)]);
m = size(o.x2,1);
if n + m < drop*NbrDraws
if n + m <= drop*NbrDraws
n = n + m;
continue
elseif n < drop*NbrDraws