MATLAB: How to create block circulant matrix

matrices

i need to create mn*mn block circulant matrix ie m blocks of n*n matrices. please help me

Best Answer

How about the following?
% For simple example
n = 3;
m = 2;
% Create n-by-n circulant matrix
B_block = gallery('circul',1:n)';
% Create nm-by-nm block circulant matrix
B_all = repmat(B_block,m);