creating a matrix by expanding a row

1 Ansicht (letzte 30 Tage)
alpedhuez
alpedhuez am 21 Apr. 2018
Beantwortet: Ameer Hamza am 21 Apr. 2018
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.

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 21 Apr. 2018

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

repmat(A, m, 1)

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by