Use the power method, in Matlab to determine the highest eigenvalue and correspo
ID: 2995073 • Letter: U
Question
Use the power method, in Matlab to determine the highest eigenvalue and corresponding eigenvector for the matrix
Explanation / Answer
function l = ww(A,E) n = length(A); y = []; x = []; for i = 1:n % starting vector x(i) = A(i,1); end; l = 0; blad = E; % starting value of error while blad>=E for i = 1:n % A*x y(i) = 0; for j = 1:n y(i) = y(i) + A(i,j)*x(j); end; end; blad = l; l = 0; % Rayleigh m = 0; for i = 1:n l = l + x(i)*y(i); m = m + x(i)*x(i); end; l = l/m; % eigenvalue blad = abs(l - blad); % error x = y; end; end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.