www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RepeatMatrixIntoRectangularBlockArrayExample.m

    %% Rectangular Block Format
% Repeat copies of a matrix into a 2-by-3 block arrangement.

% Copyright 2015 The MathWorks, Inc.

A = diag([100 200 300])

%%
B = repmat(A,2,3)