%% Largest Eigenvalues of Sparse Matrix
% The matrix A = delsq(numgrid('C',15)) is a symmetric positive definite matrix with eigenvalues reasonably well-distributed in the interval (0 8). Compute the six largest magnitude eigenvalues.

A = delsq(numgrid('C',15));
d = eigs(A)

%
% Specify a second input to compute a specific number of the largest eigenvalues.

d = eigs(A,3)

% Copyright 2012 The MathWorks, Inc.