I would like to define a function that constructs a matrix consisting of different parts (submatrices). I.e. something like
Matrix[k_,l_,n_]:=ReplacePart[ConstantArray[0,{n,n}], {1;;3,1;;n}->f[k] and {n-1;;n,n-1;;n}->g[l]]
where f[k]
returns a 3xn
matrix and g[l]
returns a 2x2
matrix. The above code doesn't work (obviously) but I am looking for something like this. Replace does work only with a single element but not with a submatrix.