Column Calculus

Functions for interpolation, integration, and differentiation of column-major data, compatible with code generation.

https://github.com/geoffstanley/neutral-surfaces/tree/master/lib/columncalculus

Vous suivez désormais cette soumission

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:

Citation pour cette source

Geoff Stanley (2026). Column Calculus (https://fr.mathworks.com/matlabcentral/fileexchange/69713-column-calculus), MATLAB Central File Exchange. Extrait(e) le .

Remerciements

A inspiré : Piecewise Polynomial Calculus

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.1.1

Update Description. No changes to files.

1.1.0

minor speed and documentation updates.

1.0.0