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.
Ali (2023). Piecewise Cubic Spline (https://www.mathworks.com/matlabcentral/fileexchange/45935-piecewise-cubic-spline), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!