GNU Scientific Library - Bugs: bug #52351, akima.c array indexing
You are not allowed to post comments on this tracker with your current authentication level.
bug #52351: akima.c array indexing
Submitter: | Patrick Alken <psa> | ||
Submitted: | 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: |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
No changes have been made to this item
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