usample.m

来自「里面囊括了基于matlab滤波器设计的各种.m文件」· M 代码 · 共 21 行

M
21
字号
% 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 + =
减小字号Ctrl + -
显示快捷键?