www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SplineInterpolationOfSineAndCosineDataExample.m
%% Spline Interpolation of Sine and Cosine Data % The following code generates sine and cosine curves, then samples the % splines over a finer mesh. % Copyright 2015 The MathWorks, Inc. x = 0:.25:1; Y = [sin(x); cos(x)]; xx = 0:.1:1; YY = spline(x,Y,xx); plot(x,Y(1,:),'o',xx,YY(1,:),'-') hold on plot(x,Y(2,:),'o',xx,YY(2,:),':') hold off