File Exchange

image thumbnail

Power iteration to find max/min eigenvalue/vector

version 1.0 (4.56 KB) by

This is an c-mex function to find the max/min eigenvalue/vector.

1 Download


No License

This is the power iteration method to find the maximum eigenvalue/eigenvector a n-by-n matrix. This method doesn't require the matrix to be Hermitian for the maximum eigenvalue/eigenvecor.
But it DOES require the matrix to be Hermitian for the minimum eigenvalue/vector. This approximation method may be improved by setting a tolerance (currently the iteration is controlled by the number of iterations, MAX).

Example: c = [1 0.5 0.2;0.5 1 0.5; 0.2 0.5 1];
then [u,v] = mPowerEig(c,0) is to find the largest eigenvalue/vector
and [u,v] = mPowerEig(c,1) is to find the minimum eigenvalue/vector

Reference: G.H. Golub, C.F. Van Load, "Matrix Computation"

Comments and Ratings (7)


Aidin (view profile)

peng kaizhi

looking at once


pong (view profile)

x z

Same here, failed for [1 0;0 2].

salim kahveci

Mori Jamshidian

Tried to find the maximum eigenvalue of [1 0;0 2], and the program failed in Matlab 14.

mah mir

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video