MATLAB: Repeat values in a matrix

MATLABmatrix

I want to convert a column matrix of size 10×1 to 10×10000 matrix in which all columns in the converted matrix are same as the values in the initial column matrix,
For example, x=[a;b;c], if i convert this to a 3×3 matrix, it should be [a a a; b b b; c c c]

Best Answer

doc repmat
x = [1 2 3] ;
iwant = repmat(x,3,1)