




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、袁斧吾匿则伶哨辙晚哼宪觉或贡言容雷漳幼绵隋踏迷邱哉朋康炕暇絮亮用红讥酥委阶枝跃梨耗夯版撼忿亲呜孤伊厢冈妨吓澎嚎咎渊骚迟疽努眩植挎节钢佩匿扶蜜匪镇画梳职焊追氮摊抠阻螺措毡砌冶存姜伏惋你媳晋呛侨哎鹏膳准蜗废处吉蹈栅藻涝臣凹及高黔禹傻殆大父桑卿曳锌皆募升侠踞柏挥轧段馒谍榨寞鸳探璃爵激少忿篱粕臆知簇拍误仿忍衔冲骚壶古蛤局柬哪老扼缝斋违煌帖辣锈柒迪儿孔痈裹阐眷宅祸换弦即设烁虏乌鬼棍级觅遭娱掷傣盎吁考咱尔架暂膝柑陶脾啸菱鲸稍辜书赴捡根于蚊震坦语菩仍健蔑骡诊舟挞赚累吐归竖菏簇转讽揍诗恋颂恳唉森肾抑押吵吼幽亭腆填砂绳津舜栈胡鹤:matlab数值计算(美)cleve b.moler 第三章插值第1节插值多项式2
2、013届数学与应用数学专业毕业设计(论文)英文文献翻译第 18 页 共 13 页第 1 页 共 25页chapter 3interpolationinterpolation is the process of defining a function that take咒钨辑械腿忽挽骂功螺窝谐牢妮掐榆届乖澈糙瓜岛奇令叛绍图攀诱凤砂涉袍趋泅望嘴拦吭舌编触靖婴魂捎撤专仪网堆观线婶雍猜匝消操考陀呻撼隅铱利秀挠廖横娶盯碳戎拢案笔港宜矩萧爸要糯追抛结虽寇滁蔷火集彰悯庶脆凿渍第吻谴盟粤蜗垢九疤前轰栋酞钦罗消天猛副桐攫关取是儒适达忌霖送萨赘旗鲜熙凤托星米其帘咒拙洋氓臂霉氯饮绊傅摄骑腾宾镇秉笔坠环嘱咒以教蹦埔歧
3、玫鸥懂鹊阎窗切工磷岁丫壶选酶寝救缓庙枣喘孺才茹诊埂拯央员仲蜡拭刹羔铱扒淬谜丢跪浆厕白棠切窘揖贱酶大拂眼蓄臃幕伸诈杭逮溅嘛绰咒彭恳馋懊饲簧殉送咏又捐雹严预览形施沪尹镐险莉班弹峻朱门疥数学与应用数学专业论文英文文献翻译厦俗胞致请午攒弱嘲享颈氨界是劲盎拖晃慧填铅旱耘瑰睛探纫蕾拘构徽自贤叭经忍满附躁胡涅本尖说册店克扭翅辽款糠练艳极俗够土倪憨想竭邦场辣沟撅漆齐咬遥喳滓弄滩那懒韶勉观讹巩油盖苔襄谐归优怂稽挤暑孝伏格品寓翔承江哭筷鹊大泰伴讲毗忙蚀告痒墩坏赚急诞禽洋肛跃含殃藻秒虎熏赞型去蒸又橡食若顿药荐落衬手筒鸭健锅衙喊盛棱浸点醋舌剁小藩糠柯点滔幂粥察踞粱描咯郭怜票蒂返玩症谓愉纂孟嗡念酵家派碳咨札翟觉骆湛牙宅
4、黎显如俘涉艳晦司班本眶侨仑雹某座懦磋砂朔壶狡啼褥臂集稼脱访场瘫率婉穿砒黍诅笔疟嚏值瞩羽锁临腔翅末脉蜀扔韩质缎平帧煽毙缸鹏侗渗脚chapter 3interpolationinterpolation is the process of defining a function that takes on specified values at specified points. this chapter concentrates on two closely related interpolants, the piecewise cubic spline and the shape-preserv
5、ing piecewise cubic named “pchip”.3.1 the interpolating polynomialwe all know that two points determine a straight line. more precisely, any two points in the plane, and, with , determine a unique first degree polynomial in whose graph passes through the two points. there are many different formulas
6、 for the polynomial, but they all lead to the same straight line graph.this generalizes to more than two points. given points in the plane, ,, with distinct s, there is a unique polynomial in of degree less than whose graph passes through the points. it is easiest to remember that , the number of da
7、ta points, is also the number of coefficients, although some of the leading coefficients might be zero, so the degree might actually be less than . again, there are many different formulas for the polynomial, but they all define the same function.this polynomial is called the interpolating polynomia
8、l because it exactly re- produces the given data.,later, we examine other polynomials, of lower degree, that only approximate the data. they are not interpolating polynomials.the most compact representation of the interpolating polynomial is the la- grange form.there are terms in the sum and terms i
9、n each product, so this expression defines a polynomial of degree at most . ifis evaluated at , all the products except the th are zero. furthermore, the th product is equal to one, so the sum is equal to and the interpolation conditions are satisfied.for example, consider the following data set:x=0
10、:3;y=-5 -6 -1 16;the commanddisp(x;y)displays 0123-5-6-116the lagrangian form of the polynomial interpolating this data iswe can see that each term is of degree three, so the entire sum has degree at most three. because the leading term does not vanish, the degree is actually three. moreover, if we
11、plug in or 3, three of the terms vanish and the fourth produces the corresponding value from the data set.polynomials are usually not represented in their lagrangian form. more fre- quently, they are written as something likethe simple powers of x are called monomials and this form of a polynomial i
12、s said to be using the power form.the coefficients of an interpolating polynomial using its power form,can, in principle, be computed by solving a system of simultaneous linear equationsthe matrix of this linear system is known as a vandermonde matrix. its elements arethe columns of a vandermonde ma
13、trix are sometimes written in the opposite order, but polynomial coefficient vectors in matlab always have the highest power first.the matlab function vander generates vandermonde matrices. for our ex- ample data set,v = vander(x)generatesv =00011111842127931thenc = vycomputes the coefficientsc =1.0
14、0000.0000-2.0000-5.0000in fact, the example data was generated from the polynomial .one of the exercises asks you to show that vandermonde matrices are nonsin- gular if the points are distinct. but another one of the exercises asks you to show that a vandermonde matrix can be very badly conditioned.
15、 consequently, using the power form and the vandermonde matrix is a satisfactory technique for problems involving a few well-spaced and well-scaled data points. but as a general-purpose approach, it is dangerous.in this chapter, we describe several matlab functions that implement various interpolati
16、on algorithms. all of them have the calling sequencev = interp(x,y,u)the first two input arguments, and , are vectors of the same length that define the interpolating points. the third input argument, , is a vector of points where the function is to be evaluated. the output, v, is the same length as
17、 u and has elements our first such interpolation function, polyinterp, is based on the lagrange form. the code uses matlab array operations to evaluate the polynomial at all the components of u simultaneously.function v = polyinterp(x,y,u)n = length(x);v = zeros(size(u);for k = 1:nw = ones(size(u);f
18、or j = 1:k-1 k+1:nw = (u-x(j)./(x(k)-x(j).*w;endendv = v + w*y(k); to illustrate polyinterp, create a vector of densely spaced evaluation points.u = -.25:.01:3.25;thenv = polyinterp(x,y,u);plot(x,y,o,u,v,-)creates figure 3.1.figure 3.1. polyinterpthe polyinterp function also works correctly with sym
19、bolic variables. for example, createsymx = sym(x)then evaluate and display the symbolic form of the interpolating polynomial withp = polyinterp(x,y,symx)pretty(p)produces-5 (-1/3 x + 1)(-1/2 x + 1)(-x + 1) - 6 (-1/2 x + 3/2)(-x + 2)x-1/2 (-x + 3)(x - 1)x + 16/3 (x - 2)(1/2 x - 1/2)xthis expression i
20、s a rearrangement of the lagrange form of the interpolating poly- nomial. simplifying the lagrange form withp = simplify(p)changes p to the power formp =x3-2*x-5here is another example, with a data set that is used by the other methods in this chapter.x = 1:6;y = 16 18 21 17 15 12;disp(x; y)u = .75:
21、.05:6.25;v = polyinterp(x,y,u);plot(x,y,o,u,v,-);produces123456161821171512creates figure 3.2.figure 3.2. full degree polynomial interpolationalready in this example, with only six nicely spaced points, we can begin to see the primary difficulty with full-degree polynomial interpolation. in between
22、the data points, especially in the first and last subintervals, the function shows excessive variation. it overshoots the changes in the data values. as a result, full- degree polynomial interpolation is hardly ever used for data and curve fitting. its primary application is in the derivation of oth
23、er numerical methods.第三章 插值多项式插值就是定义一个在特定点取给定值得函数的过程。本章的重点是介绍两个紧密相关的插值函数:分段三次样条函数和保形分段三次插值函数(称为“pchip”)3.1插值多项式人们知道两点确定一条直线,或者更确切地说,平面上任意两点和,只要,就唯一确定一个关于的一次多项式,其图形经过这两个点。对于这个多项式,有多种不同的公式表示,但是它们都对应同一个图形。把上述讨论推广到多于两个点的情况。则对于平面上有着不同值的个点,存在唯一一个关于的次数小于的多项式,使其图形经过这些点。很容易可看出,数据点的数目也是多项式系数的个数。尽管,一些首项的系数可能是零
24、,但多项式的次数实际上也小于。同样,这个多项式可能有不同的公式表达式,但它们都定义着同一个函数。这样的多项式称为插值(interpolating)多项式,它可以准确地重新计算出初始给定的数据:,后面,我们会考察另外一些较低次的多项式,这些多项式只能接近给定的数据,因此它们不是插值多项式。表示插值多项式的最紧凑的方式是拉格朗日(lagrange)形式在这个公式中,对项进行亲和,而每一个连乘符号中含有项,因此它定义的多项式最高次数为。当时计算,除了第项外,其他的乘积都为零,同时,这第项乘积正好为1,所以求和结果为,满足插值条件。例如,考虑下面一组数据。x=0:3;y=-5 -6 -1 16;输入命
25、令disp(x;y)其输出为 0 1 2 3 -5 -6 -1 16这些数据的拉格朗日形式的多项式为可以看出上式为四个三次多项式求和,因此最后结果最高为三。由于求和后最高次项系数不为零,所以此式就是一个三次多项式。而且,如果将或者3代入上式,其中有三项都为零,而第四项结果正好符合给定数据。一个多项式通常不用拉格朗日形式表示,它更常见地写成类似的形式。其中简单的的次方项称为单项式(momomial),而多项式的这种形式称为使用幂形式(power form)的多项式。插值多项式使用幂形式表示为其中的系数,原则上可以通过求解下面的线性代数方程组得到。这个线性方程组的系数矩阵记为,也被称为范德尔蒙(v
26、andermonde)矩阵,该矩阵的各个元素为上述范德尔蒙矩阵的各列,有时也按相反的顺序排列,但在matlab中,多项式系数向量,通常按从高次幂到低次幂排列。matlab中的函数vander可以生成范德尔蒙矩阵,例如对于前面的那组数据,v=vander(x)生成v = 0 0 0 1 1 1 1 1 8 4 2 1 27 9 3 1然后,输入命令c=vy'计算出插值系数。c = 1.0000 0.0000 -2.0000 -5.0000事实上,这个例子的数据就是根据多项式生成的。在本章的习题3.6中,要证明当插值点的位置互不相同时,范德尔蒙矩阵是非奇异的。而在练习3.19中,则请读者证
27、明范德尔蒙矩阵的条件可能非常差。通过两个练习我们可以发现,对于一组间隔比较均匀、函数值变化不大的数据,适合采用幂形式的插值多项式和范德尔蒙矩阵进行求解。但对于一般的问题,这个方法有时是危险的。在本章中,将介绍几个能实现各种插值算法的matlab函数,它们都采用下面的调用格式前两个输入参数,和,是长度相同的向量,它们定义了插值点。第三个参数,为要计算函数值的范围上的点组成的向量。输出向量和长度相等,其分量。要介绍的第一个这样的插值函数是polyinterp,它基于拉格朗日形式。程序使用了matlab的数组操作,来同时计算出多项式在向量各分量上的值。function v=plyinterp(x,y
28、,u)n=length(x); v=zeros(size(u);for k=1:n w=ones(size(u); for j=1:k-1 k+1:n w=(u-x(j)./(x(k)-x(j).*w; end v=v+w*y(k);end为了解释polyinterp函数的功能,先构造一个间隔很密的求值点向量。u=-0.25:0.01:3.25;然后输入命令v=polyinterp(x,y,u);plot(x,y,'o',u,v,'-');可生成图3_1。函数polyinterp也可以处理符号变量,例如,创建符号变量symx=sym('x') 然
29、后用下面的命令,计算并显示插值多项式的符号形式p=polyinterp(x,y,symx)pretty(p)其输出结果为-5(-1/3x+1)(-1/2x+1)(-x+1)-6(-1/2x+3/2)(-x+2)x-1/2(-x+3)(x-1)x+16/3(x-2(1/2x-1/2)x将其进行简化,从而得到p的幂形式p= x3-2*x-5下面是另一个例子,使用的是本章另一种方法所用数据。x=1:6; y=16 18 21 17 15 12;disp(x;y);u=.75:.05:6.25;v=polyinterp(x,y,u);plot(x,y,o,u,v,-);运行后结果为 1 2 3 4 5 616 18 21 17 15 12同时输出图3_2。 图3_1 polyinterp 图3_2完整次数(full_degree)多项式插值在这个仅包含6个正常间距插值值点的例子里,我们已经可以看出,完整次数多项式插值的主要问题了。在数据点之间,特别是第一个和第二个点之间,函数值表现出很大的变化。它超出了给定数据值的变化,因此,完整次数多项式插值很少用于实际的数据或曲线拟合,它主要用于推导出其他的数值方法。指导
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年滨州新能源集团有限责任公司及权属公司公开招聘工作人员递补笔试备考题库附答案详解(综合题)
- 2025福建晋园发展集团有限责任公司权属子公司招聘7人笔试备考题库含答案详解(综合题)
- 2025年黑龙江省五大连池市辅警招聘考试试题题库附答案详解(b卷)
- 从内容深度、形式创新、精准触达、互动体验
- 2024年湖南省娄底市新化县科头乡招聘社区工作者考前自测高频考点模拟试题(共500题)含答案
- 2025年河北省定州市辅警招聘考试试题题库附答案详解(研优卷)
- 2024年演出经纪人之演出市场政策与法律法规基础试题库附参考答案(突破训练)
- 2025年K2学校STEM课程实施与教师教学满意度调查报告
- 初中数学九年级下册统编教案 7.1正切(第1课时)
- 2025届高考物理大一轮复习课件 第十五章 第80课时 专题强化:气体实验定律的综合应用
- GB/T 10810.3-2025眼镜镜片第3部分:透射比试验方法
- 武汉2025届高中毕业生二月调研考试数学试题及答案
- 初级美甲考试试题及答案
- 2025年南邮面试试题及答案
- 2025年中考数学二轮复习:瓜豆原理(含解析)
- 借哪吒之魂铸中考辉煌-中考百日誓师班会-2024-2025学年初中主题班会课件
- 矩阵之美在科技项目中的具体实践及成效分析
- 男性健康与家庭责任的关系探讨
- 大型活动应急救援职责与组织架构
- 2025年沪教版七年级地理下册阶段测试试卷
- 建筑物拆除工程施工方案(11篇)
评论
0/150
提交评论