blkdiag
Builds a block diagonal matrix with the input parameters.
Syntax
Y = blkdiag(A, B, C, D, ...)
Inputs
- A, B, C, D, ...
- Matrices.
Outputs
- Y
- Block diagonal matrix.
Examples
y = blkdiag([10],[3],[6])
y = [Matrix] 3 x 3
10 0 0
0 3 0
0 0 6
y = blkdiag([10,2],[3,40],[50,6])
y = [Matrix] 3 x 6
10 2 0 0 0 0
0 0 3 40 0 0
0 0 0 0 50 6
Comments
Builds a block diagonal matrix of the parameters A, B, C, and so on. All arguments must be numeric and are scalar or two-dimensional arrays. The input matrices do not have to be of equal size.