This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 01/15/2011 for the course MATH 345 taught by Professor Staff during the Spring '08 term at Ohio State.
- Spring '08