Symmetrize:

Path: Common/Estimation

% Makes a square matrix symmetric by adding its transpose and dividing
 by two.

 Type Symmetrize for a demo

 This is often used to fix matrices that are slightly asymmetric due to
 numerical errors. This is particularly useful with Kalman filters
 for maintaining a symmetric covariance matrix.

--------------------------------------------------------------------------
   Form:
   p = Symmetrize( p )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   p   (n,n) Matrix

   -------
   Outputs
   -------
   p   (n,n) Symmetric matrix

--------------------------------------------------------------------------

Children:

Common: General/DispWithTitle

Back to the Common Module page