MATLAB: How to invert parts of a matrix

inverse of submatrix

Hi!
I have column vector A = [1 2 3 4 5 6 7 8 9]'. From A, I want to get to B = [1 2 3; 4 5 6; 7 8 9] by inverting the relevant subvectors of A. How can I do that?
Filippos

Best Answer

out=reshape(A,3,3)'