1 function [unionCell,indLeft,indRight,indLocLeftVec,indLocRightVec]=
unionjoint(leftCell,rightCell)
4 catCell=cellfun(@
smartcat,leftCell,rightCell,
'UniformOutput',
false);
9 nUnionElems=max(max(indLeft),max(indRight));
10 indLocLeftVec=zeros(1,nUnionElems);
11 indLocRightVec=indLocLeftVec;
13 indLocLeftVec(indLeft)=1:numel(indLeft);
14 indLocRightVec(indRight)=1:numel(indRight);
17 function catArray=
smartcat(xArray,yArray)
20 isXOk=numel(xArray)==length(xArray);
21 isYOk=numel(yArray)==length(yArray);
25 [
'corresponding cell items in input cell arrays should ',...
26 'be both either rows or colums']);
28 isXRow=size(xArray,1)==1;
29 isYRow=size(xArray,1)==1;
30 catDim=max(isXRow,isYRow)+1;
31 catArray=
cat(catDim,xArray,yArray);
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 smartcat(in xArray, in yArray)
function ismemberjoint(in leftCArr, in rightCArr, in varargin)
ISMEMBERJOINT perform joint ismember operation for two cell arrays.
function uniquejoint(in inpCArr, in varargin)
UNIQUEJOINT perform joint unique operation for cell arrays.
function unionjoint(in leftCell, in rightCell)
UNIONJOINT calculates union of corresponding elements of two cell arrays jointly accross all cell arr...
function cat(in dimNum, in varargin)