Hello
I was wondering if there is a function to turn this matrix
into this matrix
Thanks in advance,
Tommaso
You want to look into ArrayReshape.
Thank you for the replies. ArrayReshape did it for me!
I found this in the documentation for Flatten:
m = {{{{0, 0}, {0, 0}}, {{1, 0}, {0, 1}}}, {{{1, 0}, {0, 1}}, {{0,
0}, {0, 0}}}};
m // MatrixForm
Flatten[m, {{1, 3}, {2, 4}}] // MatrixForm
Another solution is given here
wcomABdivmat.nb (367 KB)
ArrayFlatten[a] also works.