⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsample.m

📁 里面囊括了基于matlab滤波器设计的各种.m文件
💻 M
字号:
 
% f = dsample(h,M)
% DSAMPLE
%     To decimate the vector h with the factor of 
% M(positive integer and M>1). The decimation result
% is function reture vector. The method is only simple
% selection.
%     See also USAMPLE and UPSAMPLE in Wavelab.


function f = dsample(h,M) 
 
 N=length(h);
 if nargin < 2
    error('Not enough input arguments');
 else
    if M > N
       disp('Vector length need be greater or equal to M');
    elseif M == N
       f = h(1);
    else
       f = h(1);
       for I = 2:N
         if rem(I-1,M) == 0
           f = [f;h(I)];
         end
       end   
    end 
 end      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -