The function [M,J,v,in]=fEigFac(P) factorizes the symmetric (or Hermitian) P matrix as:

    \[P=M^TJM=M^T\left(\begin{array}{ccc}I_{n_+}&0&0\\0&0_{n_0}&0\\0&0& I_{n_-} \end{array}\right)M\]


  • M is the outer factor
  • J is the middle term
  • v is the set of eigenvectors of P
  • in is the vector in=[n_+,n_0,n_-], where n_{+}, n_0, and n_{-} are the number of positive, zero, and negative eigenvalues respectively.

Previous page