【问题标题】:How to find the steady state vector in matlab given a 3x3 matrix如何在给定 3x3 矩阵的 matlab 中找到稳态向量
【发布时间】:2018-10-15 02:57:50
【问题描述】:

我得到一个 3x3 矩阵 [0.4, 0.1, 0.2; 0.3,0.7。 0.7; 0.3、0.2、0.1]。问题是找到稳态向量。但是,我应该使用 Matlab 来解决它,但我无法获得正确的答案。我们应该使用公式 A(x-I)=0。我可以手动解决它,但我不知道如何将它输入到 Matlab 中。非常感谢任何帮助。

【问题讨论】:

    标签: matlab matrix


    【解决方案1】:

    我会假设你的意思是x(A-I)=0,因为你写的东西对我来说真的没有意义。我写的方程式暗示x*A^n=x 这通常是稳态的意思。方程的解为A的左特征向量,特征值为1

    您可以使用eig函数获取A的特征向量和特征值。

    A = [0.4, 0.1, 0.2; 0.3, 0.7, 0.7; 0.3, 0.2, 0.1];
    % Get the eigenvalues (D) and left eigenvectors (W)
    [~,D,W] = eig(A);
    % Get the index of the eigenvalue closest to 1
    [~,idx] = min(abs(diag(D)-1));
    % Get associated eigenvector
    x = W(:,idx).';
    

    检查解决方案

    >> all(abs(x*(A-eye(size(A)))) < 1e-10)
    ans =
       logical
        1
    

    【讨论】:

    • 是的,我就是这个意思!对不起,我猜是太着急了。无论如何,非常感谢你的解释。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-23
    • 1970-01-01
    • 2013-04-29
    • 2015-01-12
    • 2014-01-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多