Language Reference

SYMSQR Function

converts a square matrix to a symmetric matrix

SYMSQR( matrix)

where matrix is a square numeric matrix.

The SYMSQR function takes a square numeric matrix (size n x n) and compacts the elements from the lower triangle into a column vector (n(n+1)/2 rows). The matrix is not checked for actual symmetry.

The following statement produces the output shown:

  
    sym=symsqr({1 2, 3 4});
 

  
                 SYM           3 rows      1 col     (numeric) 
  
                                           1 
                                           3 
                                           4
 
Note that the 2 is lost since it is only present in the upper triangle.

Previous Page | Next Page | Top of Page