diary on A=[1 1 0; 1 3 1; 0 1 5]; %M relajacion ; M=(D/w)-E; format rat syms w %es parámetro de relajacion %Por puntos M=[1/w 0 0; 1 3/w 0; 0 1 5/w]; N=M-A; Lw=inv(M)*N P=charpoly(Lw) syms T %es la variable del polinomio característico P=poly2sym(P,T) P=factor(P,T) %por bloques 1; M=[1/w 0 0; 1 3/w 1/w; 0 1/w 5/w]; N=M-A; Lw=inv(M)*N P=charpoly(Lw) P=poly2sym(P,T) P=factor(P,T) %por bloques 2; M=[1/w 1/w 0; 1/w 3/w 0; 0 1 5/w]; N=M-A; Lw=inv(M)*N P=charpoly(Lw) P=poly2sym(P,T) P=factor(P,T) diary('ejecucion_m_relajacion.m') diary off %{ ejecucion: %}