I need to compute all the eigenvectors of a sparse, real, symmetric matrix, A.
I've tried the following:
>> [V, D] = eig(A);Error using eigFor standard eigenproblem EIG(A) when A is sparse, EIG does not support computing eigenvectors. Use EIGS instead.>> [V, D] = eigs(A, size(A, 1));Warning: For real symmetric problems, must have number of eigenvalues k < n.Using eig instead.
So MATLAB gives me conflicting advice: first, to use eigs, and then to use eig! What it does internally is convert my sparse matrix to a full one. This seems inefficient if I have lots of sparsity. Any better suggestions?
Best Answer