0
$\begingroup$

I have a list of square matrices $A_i$ as follows

$$ \left(\begin{matrix}A_1 & \ldots& A_n \\A_{n+1}&\ldots &A_{2n} \\ \vdots & \ddots & \vdots \\ A_{(k-1)n+1} & \ldots & A_{kn} \end{matrix}\right) $$

and I would like to reorganise this matrix of matrices to the form of a list of matrices as the list of matrices

One way is to extract each row and append them to an empty list of course

$$ (A_1 \ldots A_n \;A_{n+1}\ldots A_{2n }\ldots A_{(k-1)n+1 } \ldots A_{kn} )$$

I'm assuming Flatten, Catenate and Partition are another way forward

$\endgroup$
  • $\begingroup$ It looks like Flatten is all you need here $\endgroup$ – GenericAccountName Feb 5 at 20:18
  • 1
    $\begingroup$ Just need to do something like Flatten[a,1]? where a is the matrix of matrices? $\endgroup$ – MKF Feb 5 at 20:20
  • $\begingroup$ Yes that should work if it's structured how you described. $\endgroup$ – GenericAccountName Feb 5 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.