Commit 49b00b97 authored by ratto's avatar ratto
Browse files

Fixed bug when actual parameter value is NULL.

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1857 ac1d8469-bf42-47a9-8791-bf33cf982152
parent b87a453c
......@@ -84,7 +84,7 @@ while i<n,
%if abs(dx(it)) ~= 0,
if abs(dx(it))<0.5*htol
if abs(dx(it)) ~= 0,
h1(i)=min(0.3*abs(x(i)), 0.9*htol/abs(dx(it))*h1(i));
h1(i)=min(max(1.e-10,0.3*abs(x(i))), 0.9*htol/abs(dx(it))*h1(i));
else
h1(i)=2.1*h1(i);
end
......@@ -170,7 +170,7 @@ xh_1=xh1;
if hflag,
gg=(f1'-f_1')./(2.*h1);
else
else
gg=(f1'-f0)./h1;
end
......
Supports Markdown
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