Is there any (relatively) easy to implement (e.g. in matlab) method of numerical computing characteristic polynomial or QR decomposition or eigenvalues? I am trying to write source code in Matlab to calculate spectral radius, I can't use built in functions. Any clues?