creating a matrix by expanding a row

1 view (last 30 days)
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

Ameer Hamza
Ameer Hamza on 21 Apr 2018

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

repmat(A, m, 1)

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!