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, consider the following statement:
  
    block(a,b,c);
 
This statement produces a matrix of the form
[ a & 0 & 0 \    0 & b & 0 \    0 & 0 & c    ]
The following statements produce the matrix c, as shown:
  
    a={2 2, 
       4 4} ; 
    b={6 6, 
       8 8} ; 
    c=block(a,b);
 

  
          C             4 rows      4 cols    (numeric) 
  
                     2         2         0         0 
                     4         4         0         0 
                     0         0         6         6 
                     0         0         8         8
 

Previous Page | Next Page | Top of Page