楼主: xuning5176
323 0

[学习分享] matlab ppval 分段多项式估值 [推广有奖]

  • 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-7 15:23:46 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
PPVAL  Evaluate piecewise polynomial.
    V = PPVAL(PP,XX) returns the value, at the entries of XX, of the
    piecewise polynomial f contained in PP, as constructed by PCHIP, SPLINE,
    INTERP1, or the spline utility MKPP.

    V is obtained by replacing each entry of XX by the value of f there.
    If f is scalar-valued, then V is of the same size as XX. XX may be ND.

    If PP was constructed by PCHIP, SPLINE or MKPP using the orientation of
    non-scalar function values specified for those functions, then:

    If f is [D1,..,Dr]-valued, and XX is a vector of length N, then V has
    size [D1,...,Dr, N], with V(:,...,:,J) the value of f at XX(J).
    If f is [D1,..,Dr]-valued, and XX has size [N1,...,Ns], then V has size
    [D1,...,Dr, N1,...,Ns], with V(:,...,:, J1,...,Js) the value of f at
    XX(J1,...,Js).

    If PP was constructed by INTERP1 using the orientation of non-scalar
    function values specified for that function, then:

    If f is [D1,..,Dr]-valued, and XX is a scalar, then V has size
    [D1,...,Dr], with V the value of f at XX.
    If f is [D1,..,Dr]-valued, and XX is a vector of length N, then V has
    size [N,D1,...,Dr], with V(J,:,...,:) the value of f at XX(J).
    If f is [D1,..,Dr]-valued, and XX has size [N1,...,Ns], then V has size
    [N1,...,Ns,D1,...,Dr], with V(J1,...,Js,:,...,:) the value of f at
    XX(J1,...,Js).

    Example:
    Compare the results of integrating the function cos and its spline
    interpolant:

      a = 0; b = 10;
      int1 = quad(@cos,a,b);
      x = a:b; y = cos(x); pp = spline(x,y);
      int2 = quad(@(x)ppval(pp,x),a,b);

    int1 provides the integral of the cosine function over the interval [a,b]
    while int2 provides the integral, over the same interval, of the piecewise
    polynomial pp that approximates the cosine function by interpolating the
    computed x,y values.

    Class support for input X and the fields of PP:
       float: double, single

    See also spline, pchip, interp1, mkpp, unmkpp, splines (The spline Toolbox).
二维码

扫码加我 拉你入群

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

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

关键词:MATLAB matla atlab Lab 多项式 obtained returns matlab

金融爱好者。

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

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