Home > Common Problem > body text

How to find eigenvalues ​​in matlab

藏色散人
Release: 2020-02-26 17:14:42
Original
27726 people have browsed it

How to find eigenvalues ​​in matlab

How to find eigenvalues ​​in matlab?

Methods for finding the eigenvalues ​​and eigenvectors of a matrix

Methods/steps

In the first step, we first need to know what is used to calculate the eigenvalues ​​and eigenvectors of a matrix eig function, you can enter help eig in the command line window to check the usage of the eig function, as shown in the following figure:

How to find eigenvalues ​​in matlab

The second step is to enter a in the command line window =[1 2 3;2 4 5;7 8 9], after pressing the Enter key, enter [x,y]=eig(a), as shown in the following figure:

How to find eigenvalues ​​in matlab

In the third step, after pressing the Enter key, the values ​​of x and y are obtained. Each column value of x represents an eigenvector of the matrix a. There are 3 eigenvectors here. The diagonal element value of y represents the matrix a. The eigenvalues ​​of , as shown in the figure below:

How to find eigenvalues ​​in matlab

Step 4 If we want to take the diagonal element value of y, we can use diag(y), as shown in the figure below:

How to find eigenvalues ​​in matlab

In the fifth step, after pressing the Enter key, you can see that the diagonal element value of y has been taken out, which is the eigenvalue of the a matrix, as shown in the following figure:

How to find eigenvalues ​​in matlab

In the sixth step, we can also help diag in the command line window, and you can see the usage of the diag function, as shown in the following figure:

How to find eigenvalues ​​in matlab

For more programming-related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of How to find eigenvalues ​​in matlab. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!