1function SUP = mmap_super(MMAPa,MMAPb,opt)
3% SUP = mmap_super(MMAPa,MMAPb,opt)
4if nargin ==2 || (nargin ==3 && strcmpi(opt,
'default'))
5 % each
class in MMAPa and MMAPb
is a distinct
class in SUP
11 SUP{1} = krons(MMAPa{1},MMAPb{1});
12 SUP{2} = krons(MMAPa{2},MMAPb{2});
15 SUP{end+1} = krons(MMAPa{2+i},zeros(n2));
19 SUP{end+1} = krons(zeros(n1),MMAPb{2+j});
21elseif nargin ==3 && strcmpi(opt,
'match')
22 %
class c in both MMAPa and MMAPb
is mapped both into class c of SUP
26 error(
'class matching failed: MMAPs have different number of classes');
30 SUP{i} = krons(MMAPa{i},MMAPb{i});
33 empty = cellfun(@isempty, MMAPa);
37 SUP = mmap_super(SUP,MMAPa{i});
40 error(
'unrecognized option');
43SUP = mmap_normalize(SUP);