numFormPoints = 10;
xyFormPoints = randn(numFormPoints, 2);
t = 1:numFormPoints;
tFine = linspace(1, numFormPoints, 1000);
xyFormGrids = spline(t, xyFormPoints.', tFine);
plot(xyFormGrids(1, :)', xyFormGrids(2, :)', '.g')
hold on
plot(xyFormPoints(:, 1),xyFormPoints(:, 2), '.r');
hold off
拟合有多值的曲线: