creating a matrix by expanding a row

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.

 Accepted Answer

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

repmat(A, m, 1)

More Answers (0)

Categories

Products

Tags

Asked:

on 21 Apr 2018

Answered:

on 21 Apr 2018

Community Treasure Hunt

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

Start Hunting!