zoukankan      html  css  js  c++  java
  • 数值分析之拉格朗日插值算法详解

     

    数值分析之拉格朗日插值方法详解

    数据点通用格式

    x0x1x2xn
    y0 y1 y2 yn

    n=1,两个数据点

    n=1,自由度为1,一个未知数表示直线拟合
    数据点两个

    x0x1
    y0 y1

    系数方程如下:
    l0(x)=x−x1x0−x1
    l1(x)=x−x0x1−x0
    拟合多项式为:P1(x)=y0l0(x)+y1l1(x)

    n=2,三个数据点

    n=2,自由度为2,2个未知数表示二次多项式拟合
    数据点3个

    x0x1x2
    y0 y1 y2

    系数方程如下:
    l0(x)=(x−x1)(x−x2)(x0−x1)(x0−x2)
    l1(x)=(x−x0)(x−x2)(x1−x0)(x1−x2)
    l2(x)=(x−x0)(x−x1)(x2−x0)(x2−x1)
    拟合多项式为:P1(x)=y0l0(x)+y1l1(x)+y2l2(x)

    n=3,四个数据点

    n=3,自由度为3,3个未知数表示3次多项式拟合
    数据点4个

    x0x1x2x3
    y0 y1 y2 y3

    系数方程如下:
    l0(x)=(x−x1)(x−x2)(x−x3)(x0−x1)(x0−x2)(x0−x3)
    l1(x)=(x−x0)(x−x2)(x−x3)(x1−x0)(x1−x2)(x1−x3)
    l2(x)=(x−x0)(x−x1)(x−x3)(x2−x0)(x2−x1)(x2−x3)
    l3(x)=(x−x0)(x−x1)(x−x2)(x3−x0)(x3−x1)(x3−x2)
    拟合多项式为:P1(x)=y0l0(x)+y1l1(x)+y2l2(x)+y3l3(x)

    n=i,通项公式

    数据点共n+1

    x0x1x2xi−1xixi+1xn
    y0 y1 y2 yi−1 yi yi+1 xn

    系数方程:

    li(x)=(x−x0)(x−x1)…(x−xi−1)(x−xi+1)…(x−xn)(xi−x0)(xi−x1)…(xi−xi−1)(xi−xi+1)…(xi−xn)=∏j=0,j≠inx−xixi−xj.


    其中i=0,1,…,n
    拟合多项式为:

    Pn(x)=∑i=0nyili(x)

    <wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">

  • 相关阅读:
    vulcanjs 包类型
    vulcanjs schemas&& collections
    vulcanjs 核心架构概念
    vulcanjs 开源工具方便快速开发react graphql meteor 应用
    ory Oathkeeper Ecosystem
    ory Oathkeeper docker-compose 安装运行
    benthos stream nats 集成试用
    benthos 几个方便的帮助命令
    benthos 通过配置文件配置 stream 说明
    benthos 通过rest api 配置 stream 说明
  • 原文地址:https://www.cnblogs.com/brightyuxl/p/9062218.html
Copyright © 2011-2022 走看看