If you don't have an equation of your dataset, then it will be simpler to use the following methods
spline()
rng(0)
x = 1:10;
y = rand(size(x));
xv = linspace(min(x), max(x), 100);
yv = spline(x, y, xv);
plot(x, y, 'ro-', xv, yv, 'b-')
pchip()
rng(0)
x = 1:10;
y = rand(size(x));
xv = linspace(min(x), max(x), 100);
yv = pchip(x, y, xv);
plot(x, y, 'ro-', xv, yv, 'b-')
makima()
rng(0)
x = 1:10;
y = rand(size(x));
xv = linspace(min(x), max(x), 100);
yv = makima(x, y, xv);
plot(x, y, 'ro-', xv, yv, 'b-')
Best Answer