楼主: xuning5176
335 0

[学习分享] Matlab spline 三次多项式插值 [推广有奖]

  • 11关注
  • 9粉丝

已卖:779份资源

讲师

87%

还不是VIP/贵宾

-

威望
0
论坛币
3812 个
通用积分
15.5361
学术水平
5 点
热心指数
3 点
信用等级
2 点
经验
4031 点
帖子
212
精华
0
在线时间
802 小时
注册时间
2009-10-13
最后登录
2025-5-28

楼主
xuning5176 发表于 2013-4-5 16:41:23 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

SPLINE Cubic spline data interpolation.
    PP = SPLINE(X,Y) provides the piecewise polynomial form of the
    cubic spline interpolant to the data values Y at the data sites X,
    for use with the evaluator PPVAL and the spline utility UNMKPP.
    X must be a vector.
    If Y is a vector, then Y(j) is taken as the value to be matched at X(j),
    hence Y must be of the same length as X  -- see below for an exception
    to this.
    If Y is a matrix or ND array, then Y(:,...,:,j) is taken as the value to
    be matched at X(j),  hence the last dimension of Y must equal length(X) --
    see below for an exception to this.

    YY = SPLINE(X,Y,XX) is the same as  YY = PPVAL(SPLINE(X,Y),XX), thus
    providing, in YY, the values of the interpolant at XX.  For information
    regarding the size of YY see PPVAL.

    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.  If Y is a vector, this
    means:
        f(X) = Y(2:end-1),  Df(min(X))=Y(1),    Df(max(X))=Y(end).
    If Y is a matrix or N-D array with SIZE(Y,N) equal to LENGTH(X)+2, then
    f(X(j)) matches the value Y(:,...,:,j+1) for j=1:LENGTH(X), then
    Df(min(X)) matches Y(:,:,...:,1) and Df(max(X)) matches Y(:,:,...:,end).

  x = 0:10;  y = sin(x);
        xx = 0:.25:10;
        yy = spline(x,y,xx);
        plot(x,y,'o',xx,yy)

用三次多项式插值可以使得曲线更加平滑,一阶和二阶连续

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Spline MATLAB matla atlab line provides except values

金融爱好者。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 18:47