ListInterpolation[array]
与えられた値の配列を補間する近似関数を表すInterpolatingFunctionオブジェクトを作成する.
ListInterpolation[array,{{xmin,xmax},{ymin,ymax},…}]
array の各値の座標を決めるグリッド域を指定する.
ListInterpolation
ListInterpolation[array]
与えられた値の配列を補間する近似関数を表すInterpolatingFunctionオブジェクトを作成する.
ListInterpolation[array,{{xmin,xmax},{ymin,ymax},…}]
array の各値の座標を決めるグリッド域を指定する.
詳細とオプション
- {xmin,xmax}等の代りに,明示的に格子線の位置をリストしてもよい.特別な指定がないときは,等間隔の格子線を引くものとする.
- ListInterpolation[array]では,格子線は各方向の整数位置に置かれるものとする.
- array は何次元の配列(任意のレベル数でネストしたリストに対応)でも指定することができる.
- ListInterpolation[array,domain]は,{array,domain}の成分と同じ精度の値を返すInterpolatingFunctionオブジェクトを生成する.
- ListInterpolationは次のオプションを取る.
-
InterpolationOrder Automatic 補間次数を設定する Method Automatic 使用する特定のメソッドを設定する PeriodicInterpolation False 補間が周期的かどうかを指定する - ListInterpolationはMethodオプションをサポートする.可能な設定値としてスプライン補間に"Spline",エルミート補間に"Hermite"がある.
例題
すべて開く すべて閉じる例 (3)
f = ListInterpolation[{1, 2, 3, 5, 8, 5}]f[2.5]Plot[f[x], {x, 1, 6}]Show[%, ListPlot[{1, 2, 3, 5, 8, 5}]]g = ListInterpolation[{1, 2, 3, 5, 8, 5}, {{0, 1}}]g[0.5]Plot[g[x], {x, 0, 1}, Epilog -> MapIndexed[Point[{(#2[[1]] - 1) / 5, #1}]&, {1, 2, 3, 5, 8, 5}]]f = ListInterpolation[Table[Sin[x y], {x, 0, 1, .25}, {y, 0, 2, .25}], {{0, 1}, {0, 2}}]Show[{Plot3D[f[x, y], {x, 0, 1}, {y, 0, 2}], Graphics3D[{Red, PointSize[0.03], Table[Point[{x, y, Sin[x y]}], {x, 0, 1, .25}, {y, 0, 2, .25}]}]}]スコープ (4)
f = ListInterpolation[{0, .3, .6, -.2, 3}, {{0, .1, .5, 1, 2}}]Plot[f[x], {x, 0, 2}]Plot[ListInterpolation[{{{0}, 0}, {{0.1}, 0.3}, {{0.5}, 0.6}, {{1}, -0.2}, {{2}, 3}}][x], {x, 0, 2}]Tableを使ってデータを作る:
Table[{{x}, Sin[4x]}, {x, 0, 3, 0.5}]f = ListInterpolation[%]Plot[f[x], {x, 0, 3}]Table[LCM[x, y], {x, 4}, {y, 4}]f = ListInterpolation[%]ContourPlot[f[x, y], {x, 1, 4}, {y, 1, 4}]一般化と拡張 (3)
Table[Evaluate[{Sin[8x], D[Sin[8 x], x]}], {x, 0, 3, 0.5}]f = ListInterpolation[%, {{0, 3}}]Plot[f[x], {x, 0, 3}]Table[Evaluate[{Sin[x y], D[Sin[x y], {{x, y}}]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}]f = ListInterpolation[%, {{0, 3}, {0, 3}}]ContourPlot[f[x, y], {x, 0, 3}, {y, 0, 3}]Table[Sin[x y], {x, 0, 3, 1.}, {y, 0, 3, 1.}]f = ListInterpolation[%, {{0, 3}, {0, 3}}]ContourPlot[f[x, y], {x, 0, 3}, {y, 0, 3}]Table[Evaluate[{Sin[x y], D[Sin[x y], {{x, y}}], D[Sin[x y], {{x, y}, 2}]}], {x, 0, 3, 1.}, {y, 0, 3, 1.}]f = ListInterpolation[%, {{0, 3}, {0, 3}}]ContourPlot[f[x, y], {x, 0, 3}, {y, 0, 3}]オプション (7)
InterpolationOrder (4)
Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 1}}, InterpolationOrder -> 0][x], {x, 0, 1}]Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 1}}, InterpolationOrder -> 1][x], {x, 0, 1}]Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 1}}, InterpolationOrder -> 2][x], {x, 0, 1}]Plot3D[ListInterpolation[IdentityMatrix[4], {{0, 1}, {0, 1}}, InterpolationOrder -> {1, 2}][x, y], {x, 0, 1}, {y, 0, 1}]Method (1)
data = RandomReal[1, 10];sp = ListInterpolation[data, {{0, 1}}, Method -> "Spline"]he = ListInterpolation[data, {{0, 1}}, Method -> "Hermite"]曲線は近いように見えるが,スプラインには連続する導関数がある:
Row[{Plot[{sp[x], he[x]}, {x, 0, 1}, PlotRange -> All],
Plot[{sp'[x], he'[x]}, {x, 0, 1}, PlotRange -> All]}]PeriodicInterpolation (2)
Plot[ListInterpolation[{1, 5, 7, 2, 3, 1}, {{0, 2 Pi}}, PeriodicInterpolation -> True][x], {x, 1, 20}]Plot3D[ListInterpolation[PadRight[IdentityMatrix[4], {4, 6}, 0, {0, 1}], {{0, 1}, {0, 1}}, PeriodicInterpolation -> {False, True}][x, y], {x, 0, 1}, {y, -1, 2}]特性と関係 (2)
data = {1, 2, 3, 5, 8, 5};f = ListInterpolation[data]Show[ListPlot[data], Plot[f[x], {x, 1, 6}]]f = ListInterpolation[{1, 2, 3, -3, -2, -1, 0, 1}, {{0, 1}}]fi[x_] = Integrate[f[x], x]Plot[{f[x], fi[x]}, {x, 0, 1}]r = FindRoot[fi[x], {x, .5}]考えられる問題 (4)
f = ListInterpolation[Table[Sin[2 Pi x], {x, 0, 1, .1}], {{0, 1}}]f[1.5]Plot[{Sin[2 Pi x], f[x]}, {x, -.5, 1.5}]デフォルトの次数選択では,各次元で少なくとも4点必要である:
ListInterpolation[{1, 2, 4}]ListInterpolation[{1, 2, 4}, InterpolationOrder -> 2]f = ListInterpolation[RandomReal[1, 10], {{0, 1}}]Plot[Evaluate[{f[x], D[f[x], x]}], {x, 0, 1}]
個の導関数が指定されている場合,補間関数は連続する
次導関数を持つ:
f = ListInterpolation[RandomReal[1, {6, 3}], {{0, 25}}]Plot[Evaluate[Table[D[f[x], {x, k}], {k, 0, 3}]], {x, 0, 25}]テクニカルノート
-
▪
- 近似関数と補間
関連するガイド
履歴
1996 で導入 (3.0) | 2008 で更新 (7.0)
テキスト
Wolfram Research (1996), ListInterpolation, Wolfram言語関数, https://reference.wolfram.com/language/ref/ListInterpolation.html (2008年に更新).
CMS
Wolfram Language. 1996. "ListInterpolation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/ListInterpolation.html.
APA
Wolfram Language. (1996). ListInterpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListInterpolation.html
BibTeX
@misc{reference.wolfram_2026_listinterpolation, author="Wolfram Research", title="{ListInterpolation}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ListInterpolation.html}", note=[Accessed: 28-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_listinterpolation, organization={Wolfram Research}, title={ListInterpolation}, year={2008}, url={https://reference.wolfram.com/language/ref/ListInterpolation.html}, note=[Accessed: 28-November-2026]}