{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Differently for comparison x2 xel return to using x so

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rs--which will be compared to see if % the Power Method is producing a new ev or not--to % two dummy vectors whose difference is outside of the tolerance x1 = 5*ones(n,1); x2 = 10*ones(n,1); %define how to tell how different x1 is from x2 e = abs(norm(x1)-norm(x2)) %set the iteration counter to 0 i = 0; while e > tol %start the Power Method x = A*x; el = max(x); %obtain the first vector, but name it different from x %so that it can be compared to the next vector obtained %from the Power Method x1 = x/el; %return to using x so that x1 is not cleared from memory x = x...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online