Repeat values in a matrix

1 次查看(过去 30 天)
I want to convert a column matrix of size 10x1 to 10x10000 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 3x3 matrix, it should be [a a a; b b b; c c c]

采纳的回答

KSSV
KSSV 2017-4-4
编辑:KSSV 2017-4-4
doc repmat
x = [1 2 3] ;
iwant = repmat(x,3,1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by