MatrixBerryCore
iscellnumeric.m
Go to the documentation of this file.
1 function [isPositive,isPosElemArr]=iscellnumeric(valueArr)
2 if iscell(valueArr)
3  if isempty(valueArr)
4  isPositive=false;
5  if nargout>1
6  isPosElemArr=logical.empty(size(valueArr));
7  end
8  else
9  isPosElemArr=cellfun('isclass',valueArr,'double')|...
10  cellfun('isclass',valueArr,'int32')|...
11  cellfun('isclass',valueArr,'int64')|...
12  cellfun('isclass',valueArr,'int16')|...
13  cellfun('isclass',valueArr,'int8')|...
14  cellfun('isclass',valueArr,'uint32')|...
15  cellfun('isclass',valueArr,'uint64')|...
16  cellfun('isclass',valueArr,'uint16')|...
17  cellfun('isclass',valueArr,'uint8')|...
18  cellfun('isclass',valueArr,'single');
19  %
20  isPositive=all(isPosElemArr(:));
21  end
22 else
23  isPositive=false;
24  if nargout>1
25  isPosElemArr=false(size(valueArr));
26  end
27 end
function iscellnumeric(in valueArr)
ISCELLNUMERIC returns true for a cell arrays consisting of numeric elements only. ...