integrate.xy(sfsmisc)
integrate.xy()所属R语言包:sfsmisc
Cheap Numerical Integration through Data points.
通过数据点便宜的数值积分。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given (x_i, f_i) where f_i = f(x_i), compute a cheap approximation of integral(a .. b) f(x) dx.
由于(x_i, f_i)其中f_i = f(x_i),便宜的近似计算的integral(a .. b) f(x) dx。
用法----------Usage----------
integrate.xy(x, fx, a, b, use.spline=TRUE, xtol=2e-08)
参数----------Arguments----------
参数:x
abscissa values.
横坐标值。
参数:fx
corresponding values of f(x).
f(x)的相应的值。
参数:a,b
the boundaries of integration; these default to min(x) and max(x) respectively.
集成的边界,这些默认情况下,MIN(x)和MAX(x)的分别。
参数:use.spline
logical; if TRUE use an interpolating spline.
逻辑,如果真用插值样条。
参数:xtol
tolerance factor, typically around sqrt(.Machine$double.eps) ......(fixme)....
糖耐量因子,通常约为sqrt(.Machine$double.eps)......(FIXME)....
Details
详细信息----------Details----------
Note that this is really not good for noisy fx values; probably a smoothing spline should be used in that case.
请注意,这实在是不适合嘈杂fx值可能在这种情况下,应使用平滑样条。
Also, we are not yet using Romberg in order to improve the trapezoid rule. This would be quite an improvement in equidistant cases.
同时,我们也尚未使用的容安澜,以提高梯形规则。这将是在等距离的情况下,相当大的改进。
值----------Value----------
the approximate integral.
近似积分。
(作者)----------Author(s)----------
Martin Maechler, May 1994 (for S).
参见----------See Also----------
integrate for numerical integration of
integrate数值积分
实例----------Examples----------
x <- 1:4
integrate.xy(x, exp(x))
print(exp(4) - exp(1), digits = 10) # the true integral[真正的积分]
for(n in c(10, 20,50,100, 200)) {
x <- seq(1,4, len = n)
cat(formatC(n,wid=4), formatC(integrate.xy(x, exp(x)), dig = 9),"\n")
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|