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

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.

Ask a homework question - tutors are online