Column Calculus

Functions for interpolation, integration, and differentiation of column-major data, compatible with code generation.
33 Downloads
Aktualisiert 1. Okt 2021

Lizenz anzeigen

Simple functions for linear interpolation, PCHIP interpolation, PCHIP differentiation, and trapezoidal integration. Instructions are given to modify the code to evaluate higher derivatives and/or the integral of the PCHIP.
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.
These use a binary search to locate the grid points straddling the point and immediately evaluate the interpolant there, rather than pre-computing then evaluating the piecewise-polynomial interpolant for the full column (see "Piecewise Polynomial Calculus" for that).
interp1qn2 and pchipqn2 are slightly faster than callinginterp1qn or pchipqn twice, because only one binary search is done. (One could modify interp1qn and pchipqn to work on cat(3, Y, Z), but that concatenation can take longer than the actual interpolation.) Feel free to make interp1qn3...!
--- This package is no longer updated here. Instead, get updates from github:

Zitieren als

Geoff Stanley (2024). Column Calculus (https://www.mathworks.com/matlabcentral/fileexchange/69713-column-calculus), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2017b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Interpolating Gridded Data finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert: Piecewise Polynomial Calculus

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.1.1

Update Description. No changes to files.

1.1.0

minor speed and documentation updates.

1.0.0