Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

The Lagrange Polynomials and Cubic Splines

Method of Solution The Lagrange interpolation is done based on Eqs. (3.132) and (3.136). The order of interpolation is an input to the function. The cubic spline interpolation is done based on Eq. (3.143). The values of the second derivatives at base points, assuming a natural spline, are calculated from Eq. (3.147). [Pg.184]

Program Description The general MATLAB function Lagrange.m performs the nth-order Lagrange interpolation. This function consists of the following three parts  [Pg.184]

At the beginning, it checks the inputs and sets the order of interpolation if nece.ssary. If not introduced to the function, the interpolation is done by the first-order Lagrange polynomial (linear interpolation). [Pg.184]

In the second part of the function, locations of all the points at which the values of the function are to be evaluated are found in between the base points. Because matrix operations are much faster than element-by-element operations in MATLAB, the required number of independent and dependent variables are arranged in two interim matrices at each location. These matrices are used at the interpolation section for doing the interpolation in vector form. [Pg.184]

The last part of the function is interpolation itself. In this section, p x) subpolynomials are calculated according to Eq. (3.136). The terms of summation (3.132) are then calculated, and, finally, the function value is determined based on Eq. (3.132). In order to be time efficient, all these calculations are done in vector form and at all the required points simultaneously. [Pg.184]


See other pages where The Lagrange Polynomials and Cubic Splines is mentioned: [Pg.184]   


SEARCH



Lagrange

Lagrange polynomials

Polynomial

Spline, cubic

© 2024 chempedia.info