%% Diagonal of Three Matrices
% Create a block diagonal matrix from three matrices of different sizes.

A1 = ones(2,2);
A2 = 2*ones(3,2);
A3 = 3*ones(2,3);
B = blkdiag(A1,A2,A3)

% Copyright 2018 The MathWorks, Inc.