Syntax Supported by the IML Procedure and the iml Action

BLOCK Function

BLOCK (matrix1 <, matrix2, …, matrix15> ) ;

This function is supported by the IML procedure and the iml action.

The BLOCK function forms a block-diagonal matrix. The blocks are defined by the arguments to the function. Up to 15 matrices can be specified. Empty matrices are supported, but have no effect. The matrices are combined diagonally to form a new matrix.

For example, if bold upper A, bold upper B, and bold upper C are any matrices, then the block matrix formed from these matrices has the following form:

Start 3 By 3 Matrix 1st Row 1st Column upper A 2nd Column 0 3rd Column 0 2nd Row 1st Column 0 2nd Column upper B 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column upper C EndMatrix

The following statements produce a block-diagonal matrix composed of three blocks, shown in Figure 19:

a = 1;
b = {2 2,
     3 3};
c = {4 4 4,
     5 5 5};
d = block(a, b, c);
print d;

Figure 19: Block Matrix

d
100000
022000
033000
000444
000555


Last updated: March 08, 2024