From 7f42c66723f1ce9c45ad7f0ca2cc18fa908f711f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= <stephane.adjemian@univ-lemans.fr> Date: Mon, 24 Sep 2012 12:58:57 +0200 Subject: [PATCH] Fixed bug. Added missing routine which set the step length when computing a numerical gradient. --- matlab/step_length_correction.m | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 matlab/step_length_correction.m diff --git a/matlab/step_length_correction.m b/matlab/step_length_correction.m new file mode 100644 index 000000000..7334aa2d6 --- /dev/null +++ b/matlab/step_length_correction.m @@ -0,0 +1,6 @@ +function c = step_length_correction(x,scale,i) + if isempty(scale) + c = 10^round(log10(abs(x))); + else + c = scale(i); + end \ No newline at end of file -- GitLab