The diagonal matrix is D = TAT^-1. I know that D = diag(diag(A)) but how do I get the T matrix in matlab?
D = diag(diag(A))