Wolfram mathematica 数学中的插值 请考虑以下分布: rs={{400, 0.00929}, {410, 0.0348}, {420, 0.0966}, {430, 0.2}, {440, 0.328}, {450, 0.455}, {460, 0.567}, {470, 0.676}, {480, 0.793}, {490, 0.904}, {500, 0.982}, {510, 0.997}, {520,0.935}, {530, 0.811}, {540, 0.65}, {550, 0.481}, {560, 0.329}, {570,0.208}, {580, 0.121}, {590, 0.0655}, {600, 0.0332}, {610, 0.0159}, {620, 0.00737}, {630, 0.00334}, {640, 0.0015}, {650,0.000677}, {660, 0.000313}, {670, 0.000148}, {680, 0.0000715}, {690,0.0000353}, {700, 0.0000178}}

Wolfram mathematica 数学中的插值 请考虑以下分布: rs={{400, 0.00929}, {410, 0.0348}, {420, 0.0966}, {430, 0.2}, {440, 0.328}, {450, 0.455}, {460, 0.567}, {470, 0.676}, {480, 0.793}, {490, 0.904}, {500, 0.982}, {510, 0.997}, {520,0.935}, {530, 0.811}, {540, 0.65}, {550, 0.481}, {560, 0.329}, {570,0.208}, {580, 0.121}, {590, 0.0655}, {600, 0.0332}, {610, 0.0159}, {620, 0.00737}, {630, 0.00334}, {640, 0.0015}, {650,0.000677}, {660, 0.000313}, {670, 0.000148}, {680, 0.0000715}, {690,0.0000353}, {700, 0.0000178}},wolfram-mathematica,interpolation,mathematica-8,Wolfram Mathematica,Interpolation,Mathematica 8,如何插值此分布以获得X轴上任意位置点的值?只需使用标准的插值功能: rsInterpolation = Interpolation@rs; Plot[rsInterpolation@x, {x, 400, 700}] 如果要拟合特定类别的函数(如正态分布),请改用FindFit如果需要良好的导数,可以执行以下操作: interp = Interpolation[rs, InterpolationOrder -> 3, Method -> "Spline"] Show[Plot[{


如何插值此分布以获得X轴上任意位置点的值?

只需使用标准的
插值功能:

rsInterpolation = Interpolation@rs;
Plot[rsInterpolation@x, {x, 400, 700}]


如果要拟合特定类别的函数(如正态分布),请改用
FindFit

如果需要良好的导数,可以执行以下操作:

interp = Interpolation[rs, InterpolationOrder -> 3, Method -> "Spline"]
Show[Plot[{interp[x], 10 interp'[x]}, {x, Min[First /@ rs], Max[First /@ rs]},
          PlotRange -> Full],
     ListPlot@rs]

使用“样条线”方法时,查看导数行为的差异:


如果它是一个分布,我认为您应该使用SmoothKernelDistribution

@500请注意插值[]显然不能像预期的那样作为外推工作。试着用Plot[Interpolation[rs]@x,{x,11000}来看看这个。这不是这个答案的缺陷@利奥尼斯希夫林:接得好。已编辑。@Mechanicalsnail我认为这里不需要正态分布拟合。这看起来像是人眼的灵敏度曲线(x轴是波长单位为nm)。@LeonidShifrin-Hmm。我相信递归的IMP今天起作用了。注释:删除此注释:删除此…FixedPoint[@Daniel's Comment[#]&]@yoda我知道,但指定它让我感觉更舒服。以防万一将来的版本会改变:)祝贺Mathematica金牌!#派对吹风者##
interp  = Interpolation[rs, InterpolationOrder -> 3, Method -> "Spline"]
interp1 = Interpolation[rs, InterpolationOrder -> 3]
Show[Plot[{interp1'[x], interp'[x] - .005}, 
          {x, Min[First /@ rs], Max[First /@ rs]}, PlotRange -> Full]]