Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not uniquenot unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLABThe convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see heresee here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are notnot sortedsorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are not sorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are not sorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.

replaced http://math.stackexchange.com/ with https://math.stackexchange.com/
Source Link

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are not sorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbersthere is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are not sorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are not sorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.

Source Link
Amro
  • 152
  • 2
  • 10

A few things to note:

  • By definition A·v = λ·v, eigenvectors are not unique. You can multiply by any constant and still get another valid eigenvector.

    The convention in MATLAB is that for eig(A), the eigenvectors are scaled so that the norm of each is 1.0, and for eig(A,B), the eigenvectors are not normalized (see here for an example). Here is the relevant part in the documentation:

    V: right eigenvectors, returned as a square matrix whose columns are the right eigenvectors of A or generalized right eigenvectors of the pair (A,B). The form and normalization of V depends on the combination of input arguments:

    • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.

    • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.

    • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) returns V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair (A,B), along the main diagonal.

      If A is symmetric and B is symmetric positive definite, then the eigenvectors in V are normalized so that the 2-norm of each is

  • In addition, eigenvalues are not sorted. You are only guaranteed that the columns of V are the corresponding right eigenvectors to the eigenvalues in D. That's not the same as svd.

    In fact, there is no total ordering of complex numbers. The convention in MATLAB is that the sort function sorts complex elements first by magnitude (i.e. abs(x)), then by phase angle on the [-pi,pi] interval (i.e. angle(x)) if magnitudes are equal.

Having considered the above, when solving the generalized eigenvalue problem, you should be getting similar results to MATLAB by using DGGEV routine in LAPACK.