Now, I'm aware of the threads existing about this question such as:
How to enter matrices in block matrix format?
How to form a block-diagonal Matrix from a list of matrices?
But I wasn't able to find the solution to my problem there. I need to make a matrix $$ \begin{pmatrix} C_1 &I\\ 0 & C_2 \end{pmatrix} $$
My problem is that $C_1$ and $C_2$ are of different sizes! $C_1$ is of size 30 and $C_2$ is of size 48. So one would expect the following code to work:
MatrixForm[ArrayFlatten[{{c1, IdentityMatrix[30], 0}, {0, c2}}]]
or maybe
MatrixForm[ArrayFlatten[{{c1, IdentityMatrix[30], ConstantArray[0,{18,18}]},
{ConstantArray[0,{30,30}], c2}}]]
But neither actually works!
Edit
I ended up using J.M's answer:
ArrayFlatten[{{c1, PadRight[IdentityMatrix[30], {Automatic, 48}]}, {0, c2}}]]
ArrayFlatten[{{c1, IdentityMatrix[30]}, {0, c2}}]
? $\endgroup$ArrayFlatten[{{c1, PadRight[IdentityMatrix[30], {Automatic, 48}]}, {0, c2}}]]
then. $\endgroup$