MATLAB: The diagonal element of a matrix is a matrix, how to convert left matrix to right matrix

matrix manipulation

for example, a matrix 1 2 4 2 4 7 23 6 9 how to convert to this matrix: 1 2 4 0 0 0 0 0 0 0 0 0 2 4 7 0 0 0 0 0 0 0 0 0 23 6 9

Best Answer