ファイル:Runge phenomenon.svg

提供: testwiki
ナビゲーションに移動 検索に移動
    元のファイル (SVG ファイル、720 × 720 ピクセル、ファイルサイズ: 24キロバイト)

    このファイルはウィキメディア・コモンズのものであり、他のプロジェクトで使用されている可能性があります。 ウィキメディア・コモンズでのファイル解説ページにある説明を以下に示します。

    概要

    解説
    English: The red curve is the Runge function.

    The blue curve is a 5th-order interpolating polynomial (using six equally spaced interpolating points). The green curve is a 9th-order interpolating polynomial (using ten equally spaced interpolating points).

    At the interpolating points, the error between the function and the interpolating polynomial is (by definition) zero. Between the interpolating points (especially in the region close to the endpoints 1 and −1), the error between the function and the interpolating polynomial gets worse for higher-order polynomials.
    Español: La curva roja es la función de Runge.

    La curva azul es un polinomio interpolante de orden 5 (usando seis puntos equiespaciados). La curva verde es un polinomio interpolante de orden 9 (usando diez puntos equiespaciados).

    A los puntos interpolantes el error entre la función y el polinomio interpolantes es cero (por definición). Entre estos puntos (especialmente cerca de los extremos 1 y -1) el error entre la función y el polinomio interpolante incrementa conforme el polinomio aumenta de orden.
    日付
    原典 投稿者自身による著作物
    作者 Nicoguaro
    SVG 開発
    InfoField
     このSVGのソースコードは正しい。
     この ベクター画像はmatplotlibで作成されました, Python and SciPy
     This SVG plot uses the path text method.
    ソースコード
    InfoField

    Python code

    from __future__ import division
    import numpy as np
    import matplotlib.pyplot as plt
    from scipy.interpolate import lagrange
    from matplotlib import rcParams
    
    rcParams['font.family'] = 'serif'
    rcParams['font.size'] = 16
    
    def runge(x):
        return 1/(1 + 25*x**2)
    
    plt.figure(figsize=(8,8))
    npts = 201
    
    # Runge Function
    x_vec = np.linspace(-1, 1, npts)
    y_vec = runge(x_vec)
    plt.plot(x_vec, y_vec, lw=2, color='r')
    
    # Fifth degree polynomial
    pts_x = np.linspace(-1, 1, 6)
    pts_y = runge(pts_x)
    poly = lagrange(pts_x, pts_y)
    y_interp = poly(x_vec)
    plt.plot(x_vec, y_interp, lw=2, color='b')
    
    # Ninth degree polynomial
    pts_x = np.linspace(-1, 1, 10)
    pts_y = runge(pts_x)
    poly = lagrange(pts_x, pts_y)
    y_interp = poly(x_vec)
    plt.plot(x_vec, y_interp, lw=2, color='g') 
    
    plt.savefig("Runge_phenomenon.svg")
    plt.show()
    

    ライセンス

    この作品の著作権者である私は、この作品を以下のライセンスで提供します。
    w:ja:クリエイティブ・コモンズ
    表示
    このファイルはクリエイティブ・コモンズ 表示 4.0 国際ライセンスのもとに利用を許諾されています。
    あなたは以下の条件に従う場合に限り、自由に
    • 共有 – 本作品を複製、頒布、展示、実演できます。
    • 再構成 – 二次的著作物を作成できます。
    あなたの従うべき条件は以下の通りです。
    • 表示 – あなたは適切なクレジットを表示し、ライセンスへのリンクを提供し、変更があったらその旨を示さなければなりません。これらは合理的であればどのような方法で行っても構いませんが、許諾者があなたやあなたの利用行為を支持していると示唆するような方法は除きます。

    キャプション

    このファイルの内容を1行で記述してください

    このファイルに描写されている項目

    題材

    22 10 2015

    24,181 バイト

    0f2b58a406488f53519b2242883ba2d3ec292a88

    ファイルの履歴

    過去の版のファイルを表示するには、その版の日時をクリックしてください。

    日時サムネイル寸法利用者コメント
    現在の版2015年10月23日 (金) 00:402015年10月23日 (金) 00:40時点における版のサムネイル720 × 720 (24キロバイト)wikimediacommons>NicoguaroUser created page with UploadWizard

    このファイルを使用しているページはありません。