[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49950] ode scripts: error on NormControl
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #49950] ode scripts: error on NormControl |
Date: |
Mon, 9 Jan 2017 23:02:04 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Update of bug #49950 (project octave):
Status: In Progress => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #2:
It doesn't seem like the calculation, when norm was on, was at all correct.
The Matlab stopping condition is at
http://www.mathworks.com/help/matlab/ref/odeset.html and is
norm(e(i)) <= max(RelTol*norm(y(i)),AbsTol(i))
I changed the code to
if (normcontrol)
sc = max (AbsTol, RelTol * max (sqrt (sumsq (x)), sqrt (sumsq (x_old))));
retval = sqrt (sumsq ((x - y))) / sc;
else
sc = max (AbsTol, RelTol .* max (abs (x), abs (x_old)));
retval = max (abs (x - y) ./ sc);
endif
and checked it in here
(http://hg.savannah.gnu.org/hgweb/octave/rev/4b5efc5d52a9).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49950>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #49950] ode scripts: error on NormControl,
Rik <=