MATLAB中的eig函数

在MATLAB中,计算矩阵A的特征值和特征向量的函数是eig(A),常用的调用格式有5种:

  1. E=eig(A):求矩阵A的全部特征值,构成向量E。
  2. [V,D]=eig(A):求矩阵A的全部特征值,构成对角阵D,并求A的特征向量构成V的列向量。
  3. [V,D]=eig(A,'nobalance'):与第2种格式类似,但第2种格式中先对A作相似变换后求矩阵A的特征值和特征向量,而格式3直接求矩阵A的特征值和特征向量。
  4. E=eig(A,B):由eig(A,B)返回N×N阶方阵A和B的N个广义特征值,构成向量E
  5. [V,D]=eig(A,B):由eig(A,B)返回方阵A和B的N个广义特征值,构成N×N阶对角阵D,其对角线上的N个元素即为相应的广义特征值,同时将返回相应的特征向量构成N×N阶满秩矩阵,且满足AV=BVD。

eig

Find eigenvalues and eigenvectors
Syntax

d = eig(A)
d = eig(A,B)
[V,D] = eig(A)
[V,D] = eig(A,'nobalance')
[V,D] = eig(A,B)
[V,D] = eig(A,B,flag)

d = eig(A)和 [V,D] = eig(A) 最为常用,注意,第一列为对应第一个特征值的特征向量。


附录:

matlab中关于eig的说明:

 EIG   Eigenvalues and eigenvectors.

  • E = EIG(X) is a vector containing the eigenvalues of a square matrix X.
  • [V,D] = EIG(X) produces a diagonal matrix D of eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that X*V = V*D.
  • [V,D] = EIG(X,'nobalance') performs the computation with balancing disabled, which sometimes gives more accurate results for certain problems with unusual scaling. If X is symmetric, EIG(X,'nobalance') is ignored since X is already balanced.
  • E = EIG(A,B) is a vector containing the generalized eigenvalues of square matrices A and B.
  • [V,D] = EIG(A,B) produces a diagonal matrix D of generalized eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D.
  • EIG(A,B,'chol') is the same as EIG(A,B) for symmetric A and symmetric positive definite B.  It computes the generalized eigenvalues of A and B using the Cholesky factorization of B.
  • EIG(A,B,'qz') ignores the symmetry of A and B and uses the QZ algorithm.
In general, the two algorithms return the same result, however using the QZ algorithm may be more stable for certain problems. The flag is ignored when A and B are not symmetric.
  • 51
    点赞
  • 244
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MATLABeig函数用于计算矩阵的特征值和特征向量。根据引用,我们可以在MATLAB文档的链接找到示例。根据引用,我们可以使用eig函数的不同调用格式来计算矩阵的特征值和特征向量。 例如,使用调用格式E = eig(A)可以计算矩阵A的全部特征值,并将其构成一个列向量E。而使用调用格式[V,D = eig(A)可以计算矩阵A的全部特征值,将其构成对角阵D,并生成矩阵V,其V的每一列是相应的特征向量。 对于MATLABeig函数,默认的算法是'chol',前提是矩阵A是Hermitian并且矩阵B是Hermitian正定矩阵,根据引用。 因此,MATLABeig函数可以用来求解矩阵的特征值和特征向量。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [**matlab eig 函数用法**](https://blog.csdn.net/Intangilble/article/details/84313758)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [MATLABeig()用法](https://blog.csdn.net/qq_45624989/article/details/105449754)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值