metropolis_draw.m: Replace round by ceil to avoid crashes when 0 draws would be used

(cherry picked from commit 2dc3ad22fdb8fedee7fdd2ed3577978bd8f37324)
time-shift
Johannes Pfeifer 2017-03-03 17:03:59 +01:00 committed by Stéphane Adjemian (Charybdis)
parent dd02aa4c03
commit 5424fde74e
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ if init
mh_nblck = options_.mh_nblck;
% set sub_draws option if empty
if isempty(options_.sub_draws)
options_.sub_draws = min(options_.posterior_max_subsample_draws, round(NumberOfDraws*mh_nblck));
options_.sub_draws = min(options_.posterior_max_subsample_draws, ceil(.25*NumberOfDraws));
else
if options_.sub_draws>NumberOfDraws*mh_nblck
skipline()