I know there have been several questions asked relating to interpolation, but I have not found any answers that would be helpful enough for me so I have the following question.
I have two arrays of points. One tracks time (x axis) and one tracks expenses (y axis) and
I want to get something like this:
InterpolatingPolynomial[{{0, 10}, {1, 122}, {2, 3.65}, {3, 56.3}, {4, 12.4}, {5, 0}}, x]
(In Mathematica that returs a constructed polynomial that fits the points). Is it possible, to return a func<double,double> constructed from two double arrays in C#?
Thanks in advance.
I think I found the solution myself after a long day of search. I interpolate a function using Lagrange Interpolation.
A
Func<double,double>can be then easily constructed using DLINQ.e.g
This returns the
Func<double,double>object. (I know that creating a new object each time is not a good solution but this is just for demonstrational purposes)