www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RepeatMatrixColumnsExample.m
%% Repeat Matrix Columns % Create a matrix and copy its columns into a new array, repeating the first column twice and second column three times. % Copyright 2015 The MathWorks, Inc. A = [1 2; 3 4] B = repelem(A,1,[2 3])