That is not a "sum" of matrices.
You need to define one large array that will accommodate
all the elements that you want.
Then for each little matrix, you write:
x(1:m,1:n) = a
where a is dimensioned as a(m,n)
for the first little array,
x(m+1:m+q, n+1:n+r) = b
(where b is dimensioned as...