找回密码
 注册
查看: 587|回复: 0

R语言 signal包 interp1()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 02:10:03 | 显示全部楼层 |阅读模式
interp1(signal)
interp1()所属R语言包:signal

                                         Interpolation
                                         插值

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Interpolation methods, including linear, spline, and cubic interpolation.
插值方法,包括线性,样条曲线,三次插值。


用法----------Usage----------


interp1(x, y, xi, method = c("linear", "nearest", "pchip", "cubic", "spline"),
        extrap = NA, ...)



参数----------Arguments----------

参数:x,y
vectors giving the coordinates of the points to be interpolated. x is assumed to be strictly monotonic.
给予的点的坐标的向量要插补。 x被认为是严格单调。


参数:xi
points at which to interpolate.  
点内插。


参数:method
one of "linear", "nearest", "pchip", "cubic", "spline".  
"linear","nearest","pchip","cubic","spline"之一。


参数:extrap
if TRUE or 'extrap', then extrapolate values beyond the endpoints. If extrap is a number, replace values beyond the endpoints with that number (defaults to NA).   
如果TRUE或'extrap',然后推断超出了端点的值。如果extrap是一个数字,取代端点的价值超过这个数字(默认为NA)。


参数:...
for method='spline', additional arguments passed to splinefun.  
为method='spline',额外的参数传递给splinefun。


Details

详细信息----------Details----------

The following methods of interpolation are available:
下面的插值方法可供选择:

'nearest': return nearest neighbour
'nearest':返回最近的邻居

'linear': linear interpolation from nearest neighbours
'linear':线性内插最近的邻居

'pchip': piecewise cubic hermite interpolating polynomial
'pchip':分段三次Hermite插值多项式

'cubic': cubic interpolation from four nearest neighbours
'cubic':三次插值从四个最近的邻居

'spline': cubic spline interpolation–smooth first and second derivatives throughout the curve
'spline':三次样条插值光滑的第一和第二衍生物整个曲线


值----------Value----------

The interpolated signal, an array of length(xi).
的内插信号,一个数组length(xi)。


(作者)----------Author(s)----------


Original Octave version by Paul Kienzle
<a href="mailto:pkienzle@user.sf.net">pkienzle@user.sf.net</a>. Conversion to R by Tom Short.



参考文献----------References----------



参见----------See Also----------

approx, filter,
approx,filter,


实例----------Examples----------


xf <- seq(0, 11, length=500)
yf <- sin(2*pi*xf/5)
#xp &lt;- c(0:1,3:10)[XP < -  C(0:1,3:10)]
#yp &lt;- sin(2*pi*xp/5)[YP  - 罪(2 * PI * XP / 5)]
xp <- c(0:10)
yp <- sin(2*pi*xp/5)
extrap <- TRUE
lin  <- interp1(xp, yp, xf, 'linear', extrap = extrap)
spl  <- interp1(xp, yp, xf, 'spline', extrap = extrap)
pch  <- interp1(xp, yp, xf, 'pchip', extrap = extrap)
cub  <- interp1(xp, yp, xf, 'cubic', extrap = extrap)
near <- interp1(xp, yp, xf, 'nearest', extrap = extrap)
plot(xp, yp, xlim = c(0, 11))
lines(xf, lin, col = "red")
lines(xf, spl, col = "green")
lines(xf, pch, col = "orange")
lines(xf, cub, col = "blue")
lines(xf, near, col = "purple")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-22 14:39 , Processed in 0.028940 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表