creating a matrix by expanding a row

5 visualizzazioni (ultimi 30 giorni)
alpedhuez
alpedhuez il 21 Apr 2018
Risposto: Ameer Hamza il 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.

Risposta accettata

Ameer Hamza
Ameer Hamza il 21 Apr 2018

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

repmat(A, m, 1)

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by