This commit is contained in:
2023-11-14 17:10:27 +08:00
commit d5a822831c
423 changed files with 5909 additions and 0 deletions

View File

@ -0,0 +1,14 @@
function mustBeNonnegativeInteger(a)
%mustBeNonnegativeInteger a function to validate the argument
% Copyright (c) Dingyu Xue, Northeastern University, China
% Last Modified 18 May, 2022
if a<0
eid='Value:Positive'; msg='Inputs must be nonnegative.';
throwAsCaller(MException(eid,msg))
end
if round(a)~=a
eid='Value:Integer'; msg='Inputs must be an integer.';
throwAsCaller(MException(eid,msg))
end
end