2 %classdef CompositeMatrixDefault
3 % For block-diagonal matrices
12 function obj = CompositeMatrixDefault(length)
13 obj.M = cell(1, length);
16 function s = size(obj, dim)
17 sizes = cellfun(@(mat)size(mat, dim), obj.M);
21 function mat = getMatrix(obj)
22 M = cell(1, length(obj));
24 if isa(obj.M{i},
'VecMat.ICompositeMatrix')
25 M{i} = getMatrix(obj.M{i});
33 function res = copy(
this)
34 res =
VecMat.CompositeMatrixDefault(this.length);
37 if isa(tmp, 'handle') && ismethod(tmp, 'copy')
38 res = set(res, copy(tmp), i);
40 res = set(res, get(this, i), i);
Handle class holding a cell array for a "composite-matrix".