Spline Core

Spline interpolation and constrained fitting for MATLAB.

Spline Core extends MATLAB’s interpolation and fitting tools into a spline framework for robust fitting and constraints.

Comparison of ordinary least squares and robust spline fitting

Features

  • InterpolatingSpline plays a role similar to interp1 in 1D and griddedInterpolant.
  • ConstrainedSpline can recover the same least-squares polynomial fit as polyfit.
  • TrajectorySpline fits and persists planar x(t), y(t) trajectories with shared-parameter derivative helpers.
  • In 1D, spline knots are chosen from the sample locations, so irregularly spaced data are handled naturally.
  • ConstrainedSpline supports robust fitting, local point constraints, and global positivity or monotonicity constraints in the same API.

The Main Classes

Class Use it for
InterpolatingSpline exact interpolation in 1D and on rectilinear tensor grids
ConstrainedSpline noisy-data fitting, robust fitting, and local or global constraints
TrajectorySpline planar trajectory fitting and persistence with shared-parameter component splines
BSpline low-level one-dimensional spline basis construction and analysis
TensorSpline low-level tensor-product spline construction and analysis