More explicit error message when no estimated_params and no smoother

Closes: #222
time-shift
Sébastien Villemot 2012-10-08 14:42:09 +02:00
parent cc26a1d806
commit c2c88600a1
1 changed files with 3 additions and 0 deletions

View File

@ -152,6 +152,9 @@ if ~isempty(estim_params_)
bayestopt_.lb = lb;
bayestopt_.ub = ub;
else% If estim_params_ is empty (e.g. when running the smoother on a calibrated model)
if ~options_.smoother
error('ESTIMATION: the ''estimated_params'' block is mandatory (unless you are running a smoother)')
end
xparam1 = [];
bayestopt_.lb = [];
bayestopt_.ub = [];