Commit b2fa7dd3 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge branch 'discret_error_message' into 'master'

discretionary_policy_1.m: check for NaN before checking for non-zero derivatives

See merge request Dynare/dynare!1644
parents ca092283 8cb99bfe
Pipeline #748 passed with stages
in 71 minutes and 55 seconds
......@@ -67,6 +67,9 @@ if options_.steadystate_flag
[U,Uy,W] = feval([M_.fname,'.objective.static'],zeros(endo_nbr,1),[], M_.params);
if any(any(isnan(Uy)))
error(['discretionary_policy: the derivatives of the objective function contain NaN'])
if any(any(Uy~=0))
for ii=1:length(non_zero_derivs)
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