Dear Octavers, if we have a p*p matrix V having r nonzero eigenvalues with r less than p. How can we write a program in which we put these r eigenvalues in a diagonal matrix R (of format r*r) and we put the corresponding eigenvectors (to these r eigenvalues) in a matrix P? Many thanks in advance. George