creating a matrix by expanding a row

1 次查看(过去 30 天)
Suppose I have a 1*N row vector A. I want to vertically concatenate A for M times to create M*N matrix. Please advise.

采纳的回答

Ameer Hamza
Ameer Hamza 2018-4-21

You can use repmat() to repeat a matrix several times. In your case you can use

repmat(A, m, 1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by