%
%  code10Wa.m -- matrix diagonalization
%

M  = [3 -2 0 ; -1 3 -2 ; 0 -1 3]

C  = [2 2 2 ; 2 0 -2 ; 1 -1 1]

Di = inv(C)*M*C