creating a matrix by expanding a row

1 visualización (últimos 30 días)
alpedhuez
alpedhuez el 21 de Abr. de 2018
Respondida: Ameer Hamza el 21 de Abr. de 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.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 21 de Abr. de 2018

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

repmat(A, m, 1)

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by