assert_squarelat.m

来自「linear time-frequency toolbox」· M 代码 · 共 43 行

M
43
字号
function assert_squarelat(a,M,R,callfun,flag)%ASSERT_SQUARELAT  Validate lattice and window size.%   Usage:  XXX=assert_squarelat(a,M,R,callfun,flag);%%   Input parameters:%         a       : Length of time shift.%         M       : Number of modulations.%         R       : Number of multiwindows.%         callfun : Name of calling function.%         flag    : See below.%         %  if flag>0 test if system is at least critically sampled.%%  This routine deliberately checks the validity of M before a, such%  that it can be used for DWILT etc., where you just pass a=M.%%  if nargin==4  flag=0;end;if  (prod(size(M))~=1 || ~isnumeric(M))  error([callfun,': M must be a scalar']);end;if (prod(size(a))~=1 || ~isnumeric(a))  error([callfun,': a must be a scalar']);end;if rem(M,1)~=0  error([callfun,': M must be an integer']);end;if rem(a,1)~=0  error([callfun,': a must be an integer']);end;if flag>0  if a>M*R    error([callfun,': The lattice must not be undersampled']);  end;end;

⌨️ 快捷键说明

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