PDA

View Full Version : Lagrange interpolation method


NewCoder
Oct27-09, 06:45 AM
Basically ive got to design and develop a software for computing a polynomial function involving a set of data points. Ive got to use an algorithm based on the lagrange interpolation method. I know it should involve two loops inside the code.

What ive been told is that
"The input to the program should consist of a
given number of data points 'n', the values of the independent
variables 'Xi' and the dependent variable 'F(Xi)' at each point,
and the 'X' value for interpolation. The data points will be
stored in arrays "x[]" and "f[]", and the 'X' value for
interpolation is stored in "x_value". Your program should
be able to determine 'F(X)' using this information."

Anyone got any ideas?

Born2bwire
Oct27-09, 07:45 AM
You should be able to find a good explanation of the Lagrangian interpolation algorithm in just about any numerical methods textbook or even on Wikipedia I imagine.