📄 usample.m
字号:
% f = usample(h,M)
%
% To upsample the vector h with the factor of
% M(positive integer and M>1). The upsample result
% is function return vector. The method is to append
% M-1 zeros between samples.
% See also DSAMPLE, and UPSAMPLE in Wavelab.
%
function f = usample(h,M)
N = length(h);
K = N+(N-1)*(M-1);
f = zeros(K,1);
f(1) = h(1);
for I = 1:K-1
if rem(I,M) == 0
f(I+1) = h(I/M+1);
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -