My implementation is here: https://github.com/BuckRogers1965/Examples/blob/master/Math/NumericAnalysis/04_Hermite.c
For the Hermite interpolation to work you need to not just measure the x and f(x) for your plot points, but also your f'(x). So if you are measuring time and distance, you should also grab the speed at the same points. Often this extra data is overlooked, which is a shame because it can often be collected at very little additional cost.
Then you double the points, and use the f'(x) at depth 1 when otherwise using the two points would result in division by zero.
This procedure only gives you the constant prefixes for each polynomial in the solution. This starts with f(x) at the zeroth level, then the first value calculated at each level after that. I push them all into a stack and then build the polynomial as I return from the recursive calculation of the results.
The depth you reach is stored in the depth of pushed values. The degree of polynomial you generate is given by depth minus one. The polynomial is calculated as shown by the printout.
Subscribe to:
Post Comments (Atom)
Progress on the campaign manager
You can see that you can build tactical maps automatically from the world map data. You can place roads, streams, buildings. The framework ...
-
The tent smelled of ozone, sawdust, and cheap miracles. On a rickety stage, a man named Constantine adjusted the frayed cuffs of his tuxedo...
-
So, I saw this kit on Amazon. It seemed too good too be true. The kit was priced right, it was less than 2 dollars for each board. Of co...
-
My plan was to get the most use possible from the $5 raspberry Pi Zero that I managed to get my hands onto by buying a full kit that include...
No comments:
Post a Comment