Skip to content
Snippets Groups Projects
Commit ee9f6606 authored by MichelJuillard's avatar MichelJuillard
Browse files

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

(cherry picked from commit 74c30093)
parent c32a2e7b
Branches
Tags
No related merge requests found
......@@ -715,12 +715,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
......@@ -753,12 +755,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment