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.
A blog devoted to challenging dogma, where ever and who ever is shoveling it.
Subscribe to:
Post Comments (Atom)
It is mathematically possible for Democrats to gain a majority before the midterms.
It is mathematically possible for Democrats to gain significant power or even take a technical "majority" if enough Republicans re...
-
The tent smelled of ozone, sawdust, and cheap miracles. On a rickety stage, a man named Constantine adjusted the frayed cuffs of his tuxedo...
-
First the bad news. For som e reason the Amazon Web S ervice console was running very badly under F irefox. It was taking forever to load a...
-
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...
No comments:
Post a Comment