Deactivate the rescaling of the perturbation in numgrad3_ and numgrad5_ routines.

time-shift
Stéphane Adjemian (Scylla) 2014-01-29 12:35:55 +01:00
parent 66c1aa78f0
commit b9c4f7d8d1
2 changed files with 15 additions and 2 deletions

View File

@ -28,13 +28,19 @@ function [g, badg] = numgrad3_(fcn,f0,x,epsilon,varargin)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
rescale_step_length = 0;
delta = epsilon;
n = length(x);
g = zeros(n,1);
badg = 0;
scale = []; % one(n,1);
if rescale_step_length
scale = [];
else
scale = ones(n,1);
end
for i=1:n
xiold = x(i);

View File

@ -30,12 +30,19 @@ function [g, badg] = numgrad5(fcn,f0,x,epsilon,varargin)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
rescale_step_length = 0;
delta = epsilon;
n = length(x);
g = zeros(n,1);
badg = 0;
scale = []; % ones(n,1);
if rescale_step_length
scale = [];
else
scale = ones(n,1);
end
for i=1:n
xiold = x(i);