MATLAB 帮助中心
按整数倍数降低采样率
y = downsample(x,n)
y = downsample(x,n,phase)
y = downsample(x,n) 用于降低 x 的采样率,方法是首先保留第一个采样,然后再保留第一个采样后的每第 n 个采样。如果 x 是矩阵,该函数将每列视为一个单独序列。
y
x
n
示例
y = downsample(x,n,phase) 用于指定对下采样序列偏移多少个采样。
phase
全部折叠
将序列的采样率降低 3 倍。
x = [1 2 3 4 5 6 7 8 9 10]; y = downsample(x,3)
y = 1×4 1 4 7 10
将序列的采样率降低 3 倍,并增加相位偏移量 2。
y = downsample(x,3,2)
y = 1×3 3 6 9
将矩阵的采样率降低 3 倍。
x = [1 2 3; 4 5 6; 7 8 9; 10 11 12]; y = downsample(x,3)
y = 2×3 1 2 3 10 11 12
输入数组,指定为向量或矩阵。如果 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 的正整数。
下采样数组,以向量或矩阵形式返回。
全部展开
此函数完全支持 GPU 数组。有关详细信息,请参阅在 GPU 上运行 MATLAB 函数 (Parallel Computing Toolbox)。
downsample
downsample 函数支持图形处理单元 (GPU) 的代码生成。您必须拥有 MATLAB® Coder™ 和 GPU Coder™ 才能生成 CUDA® 代码。
decimate | interp | interp1 | resample | spline | upfirdn | upsample
decimate
interp
interp1
resample
spline
upfirdn
upsample
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处