URL:
<http://savannah.gnu.org/bugs/?52351>
Summary: akima.c array indexing
Project: GNU Scientific Library
Submitted by: psa
Submitted on: Mon 06 Nov 2017 01:51:04 PM UTC
Category: Runtime error
Severity: 3 - Normal
Operating System:
Status: None
Assigned to: None
Open/Closed: Open
Release:
Discussion Lock: Any
_______________________________________________________
Details:
from th =dot= walter42 =at= gmx =dot= de
On the other hand, I think I found the root cause of the misbehavior of the
akima algorithm.
It is located in function akima_calc() in the block
if (NE_next == 0.0)
{
tL_ip1 = m[i+1]; /* here '+1' was missing; because after adding,
the graph looks much better */
}
All variables related to the next with indices have a '+1' except 'tl_ip1'.
Replacing 'm[i]' by 'm[i+1]' results in a smooth spline curve.
-----------------
sorry for not being exact enough.
I refer to the demo2.c example living in the sub-directory "interpolation".
If the plotutils are available then visualization can be done via
./demo2 | graph -T X
With Kind Regards,
Thomas
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52351>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/