Click here to load reader
Upload
natassja-paienne
View
13
Download
0
Embed Size (px)
DESCRIPTION
monitoring OPa
Citation preview
7/18/2019 Piecewise Cubic Hermite Interpolating Polynomial
http://slidepdf.com/reader/full/piecewise-cubic-hermite-interpolating-polynomial 1/2
Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)
expand all in page
Syntaxyi = pchip(x,y,xi)
pp = pchip(x,y)
Description
yi = pchip(x,y,xi) returns vector yi containing elements corresponding to the elements of xi
and determined by piecewise cubic interpolation within vectors x and y. The vector x specifies
the points at which the data y is given. If y is a matrix then the interpolation is performed for
each column of y and yi is length(xi)!by!size(y,2).
pp = pchip(x,y) returns a piecewise polynomial structure for use by ppval. x can be a row or
column vector. y is a row or column vector of the same length as x or a matrix with length(x)
columns.
pchip finds values of an underlying interpolating function at intermediate points such that"
• #n each subinterval is the cubic Hermite interpolant to the given
values and certain slopes at the two endpoints.
• interpolates y i.e. and the first derivative is continuous. is
probably not continuous$ there may be %umps at the .
• The slopes at the are chosen in such a way that preserves the shape of the data
and respects monotonicity. This means that on intervals where the data are monotonic so
is $ at points where the data has a local extremum so does .
Note If y is a matrix satisfies the above for each column of y.
Examples
x = -3:3;
y = [-1 -1 -1 0 1 1 1];
t = -3:.01:3;
7/18/2019 Piecewise Cubic Hermite Interpolating Polynomial
http://slidepdf.com/reader/full/piecewise-cubic-hermite-interpolating-polynomial 2/2
p = pchip(x,y,t);
s = spline(x,y,t);
plot(x,y,o,t,p,-,t,s,-.)
legen!(!ata,pchip,spline,")