Commit 74c30093 authored by MichelJuillard's avatar MichelJuillard
Browse files

making sure that dsge_likelihood.m always returns a value in fval

parent b326636d
......@@ -725,12 +725,14 @@ end
if isnan(LIK)
info = 45;
fval = objective_function_penalty_base + 100;
exit_flag = 0;
return
end
if imag(LIK)~=0
info = 46;
fval = objective_function_penalty_base + 100;
exit_flag = 0;
return
end
......@@ -763,12 +765,14 @@ fval = (likelihood-lnprior);
if isnan(fval)
info = 47;
fval = objective_function_penalty_base + 100;
exit_flag = 0;
return
end
if imag(fval)~=0
info = 48;
fval = objective_function_penalty_base + 100;
exit_flag = 0;
return
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment