clear clc A=[-1 2 -2;1 2 1;-1 -1 0] disp("R is matrix of transformation and D is a diagonal matrix ") [R D]=spec(A)