Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

BLOCK Function

forms block-diagonal matrices

BLOCK( matrix1<, matrix2,..., matrix15>)

where matrix is a numeric matrix or literal.

The BLOCK function creates a new block-diagonal matrix from all the matrices specified in the argument matrices. Up to 15 matrices can be specified. The matrices are combined diagonally to form a new matrix. For example, the statement
   block(a,b,c);
produces a matrix of the form
[ A & 0 & 0 \ 0 & B & 0 \ 0 & 0 & C
 ]
The statements
   a={2 2,
      4 4} ;
   b={6 6,
      8 8} ;
   c=block(a,b);
result in the matrix
         C             4 rows      4 cols    (numeric)

                    2         2         0         0
                    4         4         0         0
                    0         0         6         6
                    0         0         8         8

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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