Suppose I have a symbolic matrix called MAIN as follows $$ \begin{matrix} H_{00} & H_{01} & \ldots & H_{0n}\\ H_{10} & H_{11}& \ldots & H_{1n}\\ \vdots & \vdots & \ddots & \vdots\\ H_{n0} & \ldots & \ldots & H_{nn}\\ \end{matrix} $$
where each of these matrix elements is a block itself (a matrix or a vector). For example $H_{01}$ is
$$ \begin{matrix} h_1\\ h_2\\ \vdots\\ h_i \end{matrix} $$
or $H_nn$ is $$ \begin{matrix} h_{11} & h_{12} & \ldots & h_{1i}\\ h_{21} & h_{22}& \ldots &h_{2i}\\ \vdots &\vdots & \ddots & \vdots\\ h_{j1}&h_{j2}&\ldots & h_{ij}\\ \end{matrix} $$
I have calculated each of these matrix elements before and now I want to construct the MAIN matrix using them so that each matrix element is placed in the appropiate position of the MAIN matrix and the additional elements which are created due to this replacement are set to zero. How can I do this?
I applied the ArrayFlatten
command to the calculated matrix elements and then simply defined the MAIN matrix using this simplified example command
MAIN={{H00,H01,H02},{H10,H11,H12}};
but the result was not my desire one.
A Toy example: assume the initial symbolic MAIN matrix is a 2x2 matrix and H00 is just a number, H01 and H10 are 2x1 matrices, and also H22 is a 2x2 matrix so the final form of the MAIN matrix after substituting must be as follows: $$ \begin{matrix} H_{00}& u_{11}&0\\ 0&u_{21}&0\\ y_{11}&p_{11}&p_{12}\\ y_{21}&p_{21}&p_{22}\\ \end{matrix} $$
where I have called the inner elements of H01,H10 and H22 by $u$,$y$ and $p$ respectively.
Table
to construct a matrix-of-matrices is straightforward, but I also do not understand what the result should be. $\endgroup$ – Titus Dec 4 '18 at 13:38