| |
| | [No title] (Site not responding. Last check: 2007-11-04) |
 | | % % lagrange - computes Lagrange polynomial for given % interpolation points % % input: % x - vector of interpolation points x0, x1,..., xn % j - index of Lagrange polynomial L_{n,j}(x) to compute. |
 | | % the numerator is (x-x0)(x-x1)...(x-xn), where the factor % (x-xj) is excluded, which means the numerator is a % polynomial whose roots are x0, x1,..., xn except xj. |
 | | % the roots function returns the coefficients of a % polynomial that has the given roots. |
| www.stanford.edu /~lambers/math105a/code/lagrange.m (315 words) |
|