To answer some of those questions here is an example of input:
where [x0,...,xn] is pseudo-code for representing the x values as an array and [f(x0),...,f(xn)]. Then try to plot that lagrange against the function you are interpolating and you should see the desired results.
Very usefull - I need it for convertion to java code.
03 Jun 2007
07 Oct 2006
Lagrange interpolation is one of those interpolation methods that beginning textbooks include, along the way to showing you some useful methods. I imagine the textbook authors want to show you some of the history of interpolation. The fact is, high order Lagrange interpolation of this ilk was a only ever a good idea BACK IN the time of Lagrange. There has actually been progress in knowledge since then. (Surprise!) This is a terribly poor choice of interpolation method today.
In general, splines or other methods like them (PCHIP) will be less likely to introduce interpolation artifacts, oscillations, etc. Splines will be FAR less sensitive to tiny amounts of noise than will a high order Lagrange.
Even if I choose to disregard the method it implements,
the code itself is poorly implemented. It is triply looped - totally unvectorized. Expect it to be slow and if you have a large number of points, it will take more memory than need be.
If you need to use an interpolation tool, start with interp1, spline, or pchip, or look to the splines toolbox for more choices.
28 May 2006
21 May 2006
i am a student of electronics engr and hav to do numerical diff using lagrange
09 Nov 2005
good work, but it is better to use Matlab "interp1" function.
25 Oct 2005
05 Oct 2005
muito obrigado...boa sorte
24 Jun 2005
THANK YOU VERY MUCH FOR IT.
I NEEDED FOR MY STUDYING
31 May 2005
Great job!!! Good work!
11 May 2005
22 Apr 2005
Thank you for a great program
09 Mar 2005
10 Feb 2005
what did u write?????? It can write even a child!!!!
dont use such words as "for","while" and anything like that in the matlab cos it's STUPPIDNESS!!!!!!
30 Aug 2004
Man u r a king and matlab is your bitch!!
23 Nov 2003
24 Sep 2003
30 Apr 2003
20 Feb 2003
22 Jan 2003
The source code is very fantastic.it is good for research especially for mathematics purpose.