File Exchange

image thumbnail

Smoothing Cubic Splines with periodic conditions

version 1.2.0.0 (1.91 KB) by Massimo Zanetti
Implements a model for Cubic Smoothing Splines with periodic boundary conditions

7 Downloads

Updated 24 Aug 2017

View License

Smoothing cubic splines are implemented with periodic conditions, so that closed curves in any dimension can be approximated. It includes a test function to demonstrate it.
Theoretical arguments supporting this implementation can be found here:
<http://massimozanetti.altervista.org/files/mydocs/periodicCubicSmoothSplines.pdf>

Cite As

Massimo Zanetti (2019). Smoothing Cubic Splines with periodic conditions (https://www.mathworks.com/matlabcentral/fileexchange/59463-smoothing-cubic-splines-with-periodic-conditions), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

For versions prior to R2016b (where no implicit expansion is available), replace these two rows

d = ([c(2:end,:);c(1,:)]-c)./(3*h);
b = ([a(2:end,:);a(1,:)]-a)./h - c.*h - d.*(h.^2);

with these ones

d = bsxfun( @rdivide , [c(2:end,:);c(1,:)]-c , 3*h );
b = bsxfun( @rdivide , [a(2:end,:);a(1,:)]-a , h ) - bsxfun( @times , c , h ) - bsxfun( @times , d , h.^2 );

Tom

Really great code. Helped me very much! Thanks!

Code improved and technical note relased

Update is uploaded.

A new more documented and commented version will be rrelased soon.

Mario Rossi

cp

Very good work

For any question, don't esitate to contact me.

Updates

1.2.0.0

MATLAB version corrected

1.2.0.0

Improved to solve the minimization problem efficiently. Released a note with theoretical development of the minimizaiton problem.

1.1.0.0

Function header contains help information. Input checks are added. More examples in test script.

1.0.0.0

Updated image.

1.0.0.0

Changed image.

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags