%% Repeat Matrix Elements
% Expand the size of a matrix by repeating elements.
% Create a 2-by-2 matrix of ones and a 2-by-3 matrix whose elements you want to repeat.

A = [1 2 3; 4 5 6];
B = ones(2);

%
% Calculate the Kronecker tensor product using kron.

K = kron(A,B)

% The result is a 4-by-6 block matrix.
% Copyright 2012 The MathWorks, Inc.