www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/EigenvaluesofMatrixExample.m
%% Eigenvalues of Matrix %% % Use |gallery| to create a symmetric positive definite matrix. A = gallery('lehmer',4) %% % Calculate the eigenvalues of |A|. The result is a column vector. e = eig(A) %% % Alternatively, use |eigvalOption| to return the eigenvalues in a diagonal % matrix. D = eig(A,'matrix')