partgsecondversion

partgsecondversion - x(3,2))>1e-9 ||. ..

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
format long P=[ 0 1/2 1/3 1 0; 1 0 1/3 0 1/3; 0 1/2 0 0 1/3; 0 0 0 0 1/3; 0 0 1/3 0 0]; i=1; x=P; while abs(x(1,1)-x(1,2))>1e-9 || abs(x(2,1)-x(2,2))>1e-9 || abs(x(3,1)-
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x(3,2))>1e-9 ||. .. abs(x(4,1)-x(4,2))>1e-9 || abs(x(5,1)-x(5,2))>1e-9 x=P^i; i=i+1; end [B,R] = sort(x , 'descend'); disp([B R])...
View Full Document

Ask a homework question - tutors are online