Matrix Conversion

Hello, I have two (relatively simple) questions of matrix conversion.

The matrix I am working on are pretty huge and I am showing here an example of what I want to do:

Q1) How to rearrange a matrix so that the values appear more on the upper left corner, i.e., to go in the example below from left to right:

Q2) How to convert the matrix 'inside-out', i.e., to go in the example below from left to right:

Q.PNG

I would appreciate any suggestions/comments on this.

Thank you

nar