曲线拟合

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

拟合有多值的曲线:


你可能感兴趣的:(曲线拟合)