The spectral radius of a matrix is dened as the maximum of t
The spectral radius of a matrix is dened as the maximum of the magnitudes of all its eigenvalues. Calculate the spectral radius of the matrix A =[1 2 1; 0 2 0; 1 1 0].
i need matlab or octave code.
Solution
Note that I used inv(D) to directly follow the description. but the inverse of a diagonal matrix can be easily computed using diag(1 ./ diag(D)).
