remncomm.m

From Spinach Documentation Wiki
Revision as of 18:51, 5 June 2026 by Kuprov (talk | contribs) (Rename Arguments section heading to Parameters)
Jump to: navigation, search

Removes from the Hermitian operator A the part that does not commute with the Hermitian operator B.

Syntax

    C=remncomm(A,EvB)

Parameters

   A     -  a square matrix

   EvB   -  a square matrix containing eigenvectors 
            of B in columns

Outputs

   C     -  a square matrix

Notes

When the matrix B is diagonal, the part of A that commutes with it is the diagonal part, so just use diag(diag(A)).

See also

Numerical infrastructure

Version 2.5, authors: Ilya Kuprov