image thumbnail

Free-knot spline approximation

version 1.19.1.0 (122 KB) by Bruno Luong
Least squares approximation of 1D data using free-knots spline

5.4K Downloads

Updated 23 Feb 2021

View License

The purpose of this function is to provide a flexible and robust fit to one-dimensional data using free-knot splines. The knots are free and able to cope with rapid change in the underlying model. Knot removal strategy is used to fit with only a small number of knots.
Optional L2-regularization on the derivative of the spline function can be used to enforce the smoothness.
Shape preserving approximation can be enforced by specifying the lower and upper bounds of the derivative(s) of the spline function on sub-intervals. Furthermore specific values of the spline function and its derivative can be specified on a set of discrete data points.
I did not test QUADPROG engine, but I have implemented it. Any feedback is welcome.

Cite As

Bruno Luong (2021). Free-knot spline approximation (https://www.mathworks.com/matlabcentral/fileexchange/25872-free-knot-spline-approximation), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!