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

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

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

                                         Change the sampling rate of a signal
                                         变更的信号的采样率

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

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

Resample using bandlimited interpolation.
带限插值重采样使用。


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


resample(x, p, q = 1, d = 5)



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

参数:x
signal to be resampled.  
信号进行重新采样。


参数:p, q
p/q specifies the factor to resample by.  
p/q指定的因素重新取样。


参数:d
distance.  
距离。


Details

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

Note that p and q do not need to be integers since this routine does not use a polyphase rate change algorithm, but instead uses bandlimited interpolation, wherein the continuous time signal is estimated by summing the sinc functions of the nearest neighbouring points up to distance d.
请注意,p和q不必须是整数,因为这例程不使用多相速率改变算法,而是使用带限内插,其特征在于,所述连续时间信号通过求和的sinc函数的估计最近的相邻点的距离d。

Note that resample computes all samples up to but not including time n+1.  If you are increasing the sample rate, this means that it will generate samples beyond the end of the time range of the original signal. That is why xf must go all the way to 10.95 in the example below.
请注意,重采样计算所有样品,但不包括时间n +1。如果您正在增加采样率,这意味着,它会产生超出原始信号的时间范围的末尾的样本。这是为什么xf必须走一路至10.95在下面的例子。

Nowadays, the signal version in Matlab and Octave contain more modern code for  resample that has not been ported to the signal R package (yet).
如今,信号在Matlab和倍频的版本包含重采样,信号R包(还)没有被移植到更现代的代码。


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

The resampled signal, an array of length ceiling(length(x) * p / q).
经重新采样的信号,一个数组的长度ceiling(length(x) * p / q)。


(作者)----------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----------

conversion method. In ICASSP-84, Volume II, pp. 19.4.1-19.4.2.  New York: IEEE Press.



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

filter, decimate, interp
filter,decimate,interp


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


xf <- seq(0, 10.95, by=0.05)
yf <- sin(2*pi*xf/5)
xp <- 0:10
yp <- sin(2*pi*xp/5)
r <- resample(yp, xp[2], xf[2])
title("confirm that the resampled function matches the original")
plot(xf, yf, type = "l", col = "blue")
lines(xf, r[1:length(xf)], col = "red")
points(xp,yp, pch = 19, col = "blue")
legend("bottomleft", c("Original", "Resample", "Data"),
       col = c("blue", "red", "blue"),
       pch = c(NA, NA, 19),
       lty = c(1, 1, NA), bty = "n")

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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