Could we get different solutions for eigenVectors from a matrix?

前端 未结 4 1791
半阙折子戏
半阙折子戏 2020-12-02 01:22

My purpose is to find a eigenvectors of a matrix. In Matlab, there is a [V,D] = eig(M) to get the eigenvectors of matrix by using: [V,D] = eig(M).

4条回答
  •  一向
    一向 (楼主)
    2020-12-02 01:45

    I completely agree with Mr.Colin T Bowers, that MATHEMATICA does the normalization so that last value of EigenVectors become one. Using MATLAB if anybody want to produce EigenVectors result like MATHEMATICA then we can tell MATLAB Normalize the last value of EigenVectors result to 1 using following normalization step.

    M = [1, 2, 3; 4, 5, 6; 7, 8, 9];
    
    [EigVec, EigVal] = eig(M);
    
    sf=1./EigVec(end,:); %get the last value of each eigen vector and inverse for scale factor
    
    sf=repmat(sf,size(EigVec,1),1); % Repeat Scale value of each element in the vector
    
    Normalize_EigVec=EigVec.*sf;
    
    Normalize_EigVec =
    
        0.2833   -1.2833    1.0000
        0.6417   -0.1417   -2.0000
        1.0000    1.0000    1.0000
    

提交回复
热议问题