Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

VECDIAG Function

creates a vector from a diagonal

VECDIAG( square-matrix)

where square-matrix is a square numeric matrix.

The VECDIAG function creates a column vector whose elements are the main diagonal elements of square-matrix. For example, the statements

   a={2 1, 0 -1};
   c=vecdiag(a);
produce the column vector
                C             2 rows      1 col     (numeric)

                                          2
                                         -1

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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