MATLAB 帮助中心
按整数倍数提高采样率
y = upsample(x,n)
y = upsample(x,n,phase)
y = upsample(x,n) 通过在采样之间插入 n - 1 个零来提高 x 的采样率。如果 x 是矩阵,该函数将每列视为一个单独序列。
y
x
n
示例
y = upsample(x,n,phase) 用于指定对上采样序列偏移多少个采样。
phase
全部折叠
将序列的采样率提高 3 倍。
x = [1 2 3 4]; y = upsample(x,3)
y = 1×12 1 0 0 2 0 0 3 0 0 4 0 0
将序列的采样率提高 3 倍,并增加相位偏移量 2。
x = [1 2 3 4]; y = upsample(x,3,2)
y = 1×12 0 0 1 0 0 2 0 0 3 0 0 4
将矩阵的采样率提到 3 倍。
x = [1 2; 3 4; 5 6]; y = upsample(x,3)
y = 9×2 1 2 0 0 0 0 3 4 0 0 0 0 5 6 0 0 0 0
输入数组,指定为向量或矩阵。如果 x 是矩阵,该函数将列视为独立通道。
示例: cos(pi/4*(0:159)) + randn(1,160) 用于指定嵌入高斯白噪声中的正弦波。
cos(pi/4*(0:159)) + randn(1,160)
示例: cos(pi./[4;2]*(0:159))' + randn(160,2) 用于指定双通道含噪正弦波。
cos(pi./[4;2]*(0:159))' + randn(160,2)
上采样因子,指定为正整数。
数据类型: single | double
single
double
0
偏移量,指定为从 0 到 n - 1 的正整数。
上采样数组,以向量或矩阵形式返回。y 有 x×n 个采样。
全部展开
此函数完全支持 GPU 数组。有关详细信息,请参阅在 GPU 上运行 MATLAB 函数 (Parallel Computing Toolbox)。
upsample
upsample 函数支持图形处理单元 (GPU) 的代码生成。您必须拥有 MATLAB® Coder™ 和 GPU Coder™ 才能生成 CUDA® 代码。
decimate | downsample | interp | interp1 | resample | spline | upfirdn
decimate
downsample
interp
interp1
resample
spline
upfirdn
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处