Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
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 ×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. Therefore, the statement

   sym=symsqr({1 2, 3 4});
sets
                SYM           3 rows      1 col     (numeric)

                                          1
                                          3
                                          4
Note that the 2 is lost since it is only present in the upper triangle.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.