MatrixBerryCore
isequalfirstdimsize.m
Go to the documentation of this file.
1 function isPositive=isequalfirstdimsize(firstArr,secArr,nDims)
2 import mxberry.core.getfirstdimsize;
3 import mxberry.core.throwerror;
4 if ~isnumeric(nDims)||numel(nDims)~=1||fix(nDims)~=nDims||nDims<=0
5  throwerror('wrongInput',...
6  'nDims is expected to be a scalar positive integer value');
7 end
8 %
9 isPositive=isequal(getfirstdimsize(firstArr,nDims),...
10  getfirstdimsize(secArr,nDims));
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...
function getfirstdimsize(in value, in nDims)
GETFIRSTDIMSIZE returns a size vector for the first N dimensions where N is specified.
function isequalfirstdimsize(in firstArr, in secArr, in nDims)
ISEQUALFIRSTDIMSIZE checks if the specified arrays have the same size along the first N dimensions wh...