interp(signal)
interp()所属R语言包:signal
Interpolate / Increase the sample rate
内插/增加采样率
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Upsample a signal by a constant factor by using an FIR filter to interpolate between points.
上采样的信号通过使用FIR滤波器来内插点之间的一个常数因子。
用法----------Usage----------
interp(x, q, n = 4, Wc = 0.5)
参数----------Arguments----------
参数:x
the signal to be upsampled.
的信号进行上采样。
参数:q
the integer factor to increase the sampling rate by.
整数因子增加采样率。
参数:n
the FIR filter length.
FIR滤波器的长度。
参数:Wc
the FIR filter cutoff frequency.
的FIR滤波器的截止频率。
Details
详细信息----------Details----------
It uses an order 2*q*n+1 FIR filter to interpolate between samples.
它使用的顺序2*q*n+1FIR滤波器的内插样本之间。
值----------Value----------
The upsampled signal, an array of length q * length(x).
上采样的信号,一个数组的长度q * length(x)。
(作者)----------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----------
fir1, resample, interp1, decimate
fir1,resample,interp1,decimate
实例----------Examples----------
# The graph shows interpolated signal following through the[该图显示了通过插值信号以下]
# sample points of the original signal.[的原始信号的采样点。]
t <- seq(0, 2, by = 0.01)
x <- chirp(t, 2, 0.5, 10, 'quadratic') + sin(2*pi*t*0.4)
y <- interp(x[seq(1, length(x), by = 4)], 4, 4, 1) # interpolate a sub-sample[内插的子样本]
plot(t, x, type = "l")
idx <- seq(1,length(t),by = 4)
lines(t, y[1:length(t)], col = "blue")
points(t[idx], y[idx], col = "blue", pch = 19)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|