Hermite cubic interpolating polynomial with specified derivatives

Computes piecewise cubic polynomial which interpolates function values and first derivatives.
1.2K Downloads
Updated 4 Oct 2010

View License

PP = PCHIPD(X,Y,D) provides the piecewise cubic polynomial which interpolates values Y and derivatives D at the sites X. This is meant to augment the built-in Matlab function PCHIP, which does not allow the user to specify derivatives.

X must be a vector.

If Y and D are vectors, then Y(i) and D(i) are the value and derivative to be matched at X(i).

If Y and D are matrices, then size(Y,2) == size(D,2) == length(X). Also, size(Y,1) == size(D,1). Use this for interpolating vector valued functions.

YY = PCHIPD(X,Y,D,XX) is the same as YY = PPVAL(PCHIPD(X,Y,D),XX), thus providing, in YY, the values of the interpolant at XX.

Cite As

Nick Henderson (2024). Hermite cubic interpolating polynomial with specified derivatives (https://www.mathworks.com/matlabcentral/fileexchange/28944-hermite-cubic-interpolating-polynomial-with-specified-derivatives), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Polynomials in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0