File Exchange

image thumbnail

Piecewise Polynomial Calculus

version 1.0.0 (11.5 KB) by Geoff Stanley
Functions for piecewise polynomial interpolation, integration, and differentiation of column-major data, compatible with code generation.

2 Downloads

Updated 25 Oct 2019

View License

Fast, codegen-compatible functions to build piecewise polynomial 1D interpolants of column-major data, and to evaluate, integrate, or differentiate them.

Linear, PCHIP, and Modified Akima interpolants are provided.

These functions efficiently work on every column of their inputs, and handle cases where an input has only one column (without internally expanding that variable). Each column is handled separately inside a for loop. This can be executed quickly by turning these functions into MEX functions via code generation -- although they are fairly fast in MATLAB R2015b and later owing to the JIT compiler. Evaluation is done using a fast binary search.

See also "Column Calculus".

Cite As

Geoff Stanley (2020). Piecewise Polynomial Calculus (https://www.mathworks.com/matlabcentral/fileexchange/73114-piecewise-polynomial-calculus), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: SPLINEFIT, Column Calculus