<< bin2num Elementary functions cast >>

blkdiag


Block diagonal matrix


Syntax


R = blkdiag(M1, ... , MN)

Input argument


M1, ..., MN

a numeric 2D matrix

Output argument


R

a matrix.

Description


R = blkdiag(M1, ... , MN) build the block diagonal matrix created by aligning the input matrices M1, ... , MN along the diagonal of R.

Example


blkdiag(magic(2), magic(3), magic(4))

See also


diag.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< bin2num Elementary functions cast >>