block_matrix INDEX

BLOCK_MATRIX _ _ _ _ _ _ _ _ _ _ _ _ operator

syntax:

block_matrix(<r>,<c>,<matrix\_list>)

<r>,<c> :- positive integers.

<matrix\_list> :- a list of matrices.

block_matrixcreates a matrix that consists of <r> by <c> matrices filled from the <matrix\_list> row wise.

examples:


B := make_identity(2); 

       [1  0]
  b := [    ]
       [0  1]



C := mat((5),(5)); 

       [5]
  c := [ ]
       [5]



D := mat((22,33),(44,55)); 

       [22  33]
  d := [      ]
       [44  55]



block_matrix(2,3,{B,C,D,D,C,B}); 


  [1   0   5  22  33]
  [                 ]
  [0   1   5  44  55]
  [                 ]
  [22  33  5  1   0 ]
  [                 ]
  [44  55  5  0   1 ]