永发信息网

matlab里的pp1=csape(X0,Y0)为什么括号里没有给边界类型?

答案:1  悬赏:10  手机版
解决时间 2021-11-25 12:52
  • 提问者网友:爱了却不能说
  • 2021-11-25 03:04
matlab里的pp1=csape(X0,Y0)为什么括号里没有给边界类型?
最佳答案
  • 五星知识达人网友:未来江山和你
  • 2021-11-25 04:40
查看help文件,可以得到如下解释:
pp = csape(x,y)
pp = csape(x,y,conds)

pp = csape(x,y)is the ppform of a cubic spline s with knot sequence x that satisfies s(x(j)) =y(:,j) for all j, as well as an additional end condition at the ends (meaningthe leftmost and at the rightmost data site), namely the default conditionlisted below. The data values y(:,j) may be scalars, vectors, matrices, evenND-arrays. Data values at the same data site are averaged.

pp =csape(x,y,conds) lets you choose the end conditions to be used, from a ratherlarge and varied catalog, by proper choice of conds. If needed, you supply thecorresponding end condition values as additional data values, with the first(last) data value taken as the end condition value at the left (right) end. Inother words, in that case, s(x(j)) matches y(:,j+1) for all j, and the variableendcondvals used in the detailed description below is set to y(:,[1 end]). Forsome choices of conds, these end condition values need not be present and/orare ignored when present.

Conds may be astring whose first character matches one of the following: 'complete' or'clamped', 'not-a-knot', 'periodic', 'second', 'variational', with thefollowing meanings.

'complete' or'clamped' Match endslopes (as given, with default as under"default'').

not-a-knot' Makesecond and second-last sites inactive knots (ignoring end condition values ifgiven).

'periodic' Match first and second derivatives atleft end with those at right end.

'second' Match end second derivatives (as given,with default [0 0], i.e., as in 'variational').

'variational' Setend second derivatives equal to zero (ignoring end condition values if given).

Default Match endslopes to the slope of the cubicthat matches the first four data at the respective end (i.e., Lagrange).

也就是说pp=csape(x,y)取的是默认方法“complete”或“clamped”,即m边界条件(具体参见数值分析书籍);此时端点斜率不知道,在matlab中是这样处理的:分别对两端的8个点x_0,x_1,x_2,x_3和x_n-3,x_n-2,x_n-1,x_n进行三次Lagrange插值得到L_a(x)和L_b(x),则S'(a)=L'_a(a)和S'(b)=L'_b(b)。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯