This MATLAB function returns a vector of interpolated values s corresponding to the query points in xq.
Use spline to interpolate a sine curve over unevenly-spaced sample points.
Use clamped or complete spline interpolation when endpoint slopes are known. To do this, you can specify the values vector y with two extra elements, one at the beginning and one at the end, to define the endpoint slopes.
Extrapolate a data set to predict population growth.
Generate the plot of a circle, with the five data points y(:,2),,y(:,6) marked with o's. The matrix y contains two more columns than does x. Therefore, spline uses y(:,1) and y(:,end) as the endslopes. The circle starts and ends at the point (1,0), so that point is plotted twice.
Use spline to sample a function over a finer mesh.
Compare the interpolation results produced by spline, pchip, and makima for two different data sets. These functions all perform different forms of piecewise cubic Hermite interpolation. Each function differs in how it computes the slopes of the interpolant, leading to different behaviors when the underlying data has flat areas or undulations.
Baseline Spline Fit
Experiment with some spline approximation methods - MATLAB splinetool - MathWorks India
Cubic spline data interpolation - MATLAB spline - MathWorks
Cubic Spline Interpolation
Cubic spline data interpolation - MATLAB spline
SplineDemo.m
Cubic Spline Interpolation - MATLAB & Simulink Example
a) Location of points, b) Spline interpolation of data in the Matlab
Cubic spline data interpolation - MATLAB spline
Write a MATLAB function to perform cubic spline
Cubic Spline - an overview