📄 assert_squarelat.m
字号:
function assert_squarelat(a,M,R,callfun,flag)%ASSERT_SQUARELAT Validate lattice and window size.% Usage: 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.%% % This program is free software: you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation, either version 3 of the License, or% (at your option) any later version.% % This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.% % You should have received a copy of the GNU General Public License% along with this program. If not, see <http://www.gnu.org/licenses/>.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -