Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

SQRSYM Function

converts a symmetric matrix to a square matrix

SQRSYM( matrix)

where matrix is a symmetric numeric matrix.

The SQRSYM function takes a matrix such as those generated by the SYMSQR function and transforms it back into a square matrix. The elements of the argument are unpacked into the lower triangle of the result and reflected across the diagonal into the upper triangle.

For example, the following statement

   sqr=sqrsym(symsqr({1 2, 3 4}));
which is the same as
   sqr=sqrsym({ 1, 3, 4} );
produces the result
                SQR           2 rows      2 cols    (numeric)

                                     1         3
                                     3         4

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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