MATLAB Function Reference    
blkdiag

Construct a block diagonal matrix from input arguments

Syntax

Description

out = blkdiag(a,b,c,d,...) where a, b, ... are matrices outputs a block diagonal matrix of the form:


The input matrics do not have to be square, nor do they have to be of equal size.

blkdiag works not only for matrices, but for any MATLAB objects which support horzcat and vertcat operations.

See Also

diag


 blanks box