How can I create a matrix of N columns formed by just one vector?
8 次查看(过去 30 天)
显示 更早的评论
Hi! If I have a vector like (5 8 7 9 8 4 7)' how can I create a matrix of N (for example 1000) columns formed by this vector? Thank you!
0 个评论
采纳的回答
Ahmet Cecen
2015-4-23
编辑:Ahmet Cecen
2015-4-23
for a row vector concatenated vertically:
A=repmat(vector,[1000 1]);
for a column vector concatenated horizontally:
A=repmat(vector,[1 1000]);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!