Next: broyden() Up: Mathematical Macros Help File Previous: binom()   Contents

blockdmat()

Usage:
blockdmat(A1,A2,...,Ak), A1, A2, ... matrices, all of the same type,
  REAL, LOGICAL or CHARACTER



Keywords: matrices
B <- blockdmat(A1,A2,...,Ak), where A1, A2, ..., Ak are matrices,
creates a block diagonal matrix B with diagonal blocks A1, ..., Ak.  B
will have the same type as A1, ..., Ak which must all have the same
type.  Elements of B outside the blocks are 0 , F or "", depending on
the type.

If Aj is mj by nj, j = 1,...,k, then B is m1 + m2 + ... + mk by n1 + n2
+ ... + nk.

Example:                                                 [1 1 1 0 0]
           [1 1 1]       [2 2]                           [1 1 1 0 0]
When  A1 = [1 1 1], A2 = [2,2], then blockdmat(A1, A2) = [0 0 0 2 2]
                         [2,2]                           [0 0 0 2 2]
                                                         [0 0 0 2 2]

See also dmat(), diag().


Gary Oehlert 2003-01-15