Piecewise Cubic Spline

Version 1.0.0.0 (3.65 KB) by Ali
Trajectory planning for robotic locomotion by stitching two cubic polynomials
408 Downloads
Updated 19 Mar 2014

View License

Simple code that uses the following initial and final conditions to generate the x and y co-ordinate trajectory.
t(s) x(m) y(m)
0.0 0.1 0.0
0.5 0.3 0.1
1.0 0.5 0.0

Two solve for two cubic polynomials (polynomial 0/1 or p0/p1) look at time intervals t 0.0 to 0.5 and t 0.5 to 1.0. This requires eight bits (4 each) of independent information to solve for each coefficient.

This is denoted in the eight by eight matrix. The coefficients are evaluated and cubic spline plotted against time.

Cite As

Ali (2024). Piecewise Cubic Spline (https://www.mathworks.com/matlabcentral/fileexchange/45935-piecewise-cubic-spline), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
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!
Version Published Release Notes
1.0.0.0