Merge pull request #999 from JohannesPfeifer/init_fix

Add check whether bayestopt_ is empty
time-shift
MichelJuillard 2015-07-27 21:54:05 +02:00
commit 6864a5fad6
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ if ~isempty(estim_params_)
[xparam1,estim_params_,bayestopt_,lb,ub,M_] = set_prior(estim_params_,M_,options_);
end
if any(bayestopt_.pshape==0) && any(bayestopt_.pshape~=0)
if ~isempty(bayestopt_) && any(bayestopt_.pshape==0) && any(bayestopt_.pshape~=0)
error('Estimation must be either fully ML or fully Bayesian. Maybe you forgot to specify a prior distribution.')
end
% Check if a _prior_restrictions.m file exists