When mh_posterior_mode_estimation, trap cases where the prior mode is at the boundary.

time-shift
Marco Ratto 2015-09-25 12:42:17 +02:00 committed by Johannes Pfeifer
parent a3ab6de6c8
commit 951dfe8ff4
1 changed files with 2 additions and 0 deletions

View File

@ -366,6 +366,8 @@ else
xparam1 = bayestopt_.p5;
idNaN = isnan(xparam1);
xparam1(idNaN) = bayestopt_.p1(idNaN);
outside_bound_pars=find(xparam1 < bounds.lb | xparam1 > bounds.ub);
xparam1(outside_bound_pars) = bayestopt_.p1(outside_bound_pars);
end
if ~options_.cova_compute