早教吧 育儿知识 作业答案 考试题库 百科 知识分享

哪为大哥有三次样条插值MATLAB函数的程序啊,给小弟发个啊,急用!如题!就这多分了,全部送上!

题目详情
哪为大哥有三次样条插值MATLAB函数的程序啊,给小弟发个啊,急用!
如题!就这多分了,全部送上!
▼优质解答
答案和解析
matlab自带三次样条的程序啊
>> help spline
SPLINE Cubic spline data interpolation.
YY = SPLINE(X,Y,XX) uses cubic spline interpolation to find YY,the values
of the underlying function Y at the points in the vector XX.The vector X
specifies the points at which the data Y is given.If Y is a matrix,then
the data is taken to be vector-valued and interpolation is performed for
each column of Y and YY will be length(XX)-by-size(Y,2).
PP = SPLINE(X,Y) returns the piecewise polynomial form of the cubic spline
interpolant for later use with PPVAL and the spline utility UNMKPP.
Ordinarily,the not-a-knot end conditions are used.However,if Y contains
two more values than X has entries,then the first and last value in Y are
used as the endslopes for the cubic spline.Namely:
f(X) = Y(:,2:end-1),df(min(X)) = Y(:,1),df(max(X)) = Y(:,end)
Example:
This generates a sine curve,then samples the spline over a finer mesh:
x = 0:10; y = sin(x);
xx = 0:.25:10;
yy = spline(x,y,xx);
plot(x,y,'o',xx,yy)
Example:
This illustrates the use of clamped or complete spline interpolation where
end slopes are prescribed.Zero slopes at the ends of an interpolant to the
values of a certain distribution are enforced:
x = -4:4; y = [0 .15 1.12 2.36 2.36 1.46 .49 .06 0];
cs = spline(x,[0 y 0]);
xx = linspace(-4,4,101);
plot(x,y,'o',xx,ppval(cs,xx),'-');
See also INTERP1,PPVAL,SPLINES (The Spline Toolbox).
看了 哪为大哥有三次样条插值MAT...的网友还看了以下:

如图所示,一根铁棒在水平拉力F的作用下,以O点为转轴,由竖直逆时针匀速转向水平位置的过程中,动力F  2020-06-07 …

由某门电路构成的一简单控制电路如图,其中R′为光敏电阻,光照时电阻很小,R为变阻器,L为小灯泡.其  2020-06-19 …

如图所示,一根铁棒在水平拉力F的作用下,以O点为转轴,由竖直逆时针匀速转向水平位置的过程中,动力F  2020-07-04 …

如图,一根重木棒在水平动力(拉力)F的作用下以O点为轴,由竖直位置逆时针匀速转到水平位置的过程中,  2020-07-04 …

如图所示,玻璃管内封闭了一段气体,气柱长度为L,管内外水银面高度差为h,若温度保持不变,把玻璃管稍  2020-07-06 …

关于洪特定则(洪德定则)附加规则的疑问对于同一支壳层的同科电子,如果电子数不足或等于满壳层电子数的一  2020-11-07 …

如图为一个由某种门电路构成的简单控制电路,其中R为光敏电阻,光照时电阻很小,R为变阻器,L为小灯泡.  2020-11-26 …

如图所示,玻璃管内封闭了一段气体,气柱长度为L,管内外水银面高度差为h,若温度保持不变,把玻璃管稍向  2020-12-08 …

甲、乙两地之间有一条笔直的公路L,小明从甲地出发沿公路L步行前往乙地,同时小亮从乙地出发沿公路L骑自  2020-12-27 …

小新和小明用扑克牌玩比大小游戏.如果小新按下面的顺序出牌,那么小明怎样出牌就能赢?在下面的表格里填上  2021-01-15 …