File:Lagrange polynomial.svg

原始文件(SVG文件,尺寸为743 × 503像素,文件大小:85 KB)


摘要

描述
English:
 
本W3C状态不明的矢量图使用Mathematica创作。
This image shows, for four points ((−9, 5), (−4, 2), (−1, −2), (7, 9)), the (cubic) interpolation polynomial L(x) (dashed, black), which is the sum of the scaled basis polynomials y1ℓ1(x), y2ℓ2(x), y3ℓ3(x) and y4ℓ4(x) (colors). The interpolation polynomial passes through all four control points, and each scaled basis polynomial passes through its respective control point and is 0 where x corresponds to the other three control points.
日期
来源 Self-made, based on Image:Lagrangepolys.png
作者 User:Glosser.ca
其他版本 Image:Lagrangepolys.png

Source

colors = ColorData[97] /@ Range[4];
pts = {{\[Minus]9, 5}, {\[Minus]4, 2}, {\[Minus]1, \[Minus]2}, {7, 9}};
{xs, ys} = Transpose[pts];

Basis[pts_, x_] := Times @@ (x - DeleteCases[pts, #])/Times @@ (# - DeleteCases[pts, #]) & /@ pts

Plot[
 {
  Evaluate[ys*Basis[xs, x]],
  Total[ys*Basis[xs, x]]
 }, {x, -9, 7},
 PlotStyle -> {Automatic, Automatic, Automatic, Automatic, Directive[Black, Dashed]},
 Frame -> True,
 Axes -> False,
 ImageSize -> Large,
 GridLines -> Automatic,
 GridLinesStyle -> Directive[LightGray, Dashed],
 PlotStyle -> Thick,
 Epilog -> Table[{PointSize[0.02], ColorData[97][i], Point[pts[[i]]]}, {i,4}],
 PlotLegends -> Placed[
  LineLegend[{
   Subscript[\[ScriptL], 1][x], 
   Subscript[\[ScriptL], 2][x],
   Subscript[\[ScriptL], 3][x], 
   Subscript[\[ScriptL], 4][x],
   L[x]
  }, LegendLayout -> {"Row", 1}],
  Top
 ],
 FrameStyle -> Black
]

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 3.0 未本地化版本许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
本许可协议标签作为GFDL许可协议更新的组成部分被添加至本文件。
您可以选择您需要的许可协议。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2016年4月23日 (六) 18:292016年4月23日 (六) 18:29版本的缩略图743 × 503(85 KB)RayhemSwapped axis for frame; added legend.
2015年12月26日 (六) 16:012015年12月26日 (六) 16:01版本的缩略图449 × 278(62 KB)RayhemAdded major ticks to axis, removed some of the top/bottom whitespace
2009年1月2日 (五) 13:072009年1月2日 (五) 13:07版本的缩略图391 × 390(100 KB)Renamed user KdYpUvMgT
2008年12月20日 (六) 20:012008年12月20日 (六) 20:01版本的缩略图391 × 390(101 KB)Renamed user KdYpUvMgT{{Information |Description={{en|1=This image shows, for four points ((−9, 5), (−4, 2), (−1, −2), (7, 9)), the (cubic) interpolation polynomial L(x), which is the sum of the scaled basis polynomials y0ℓ0(x), y1ℓ1(x), y2ℓ2(x) and y3ℓ3(x). Th

以下2个页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据