How can I create a matrix of N columns formed by just one vector?

9 visualizaciones (últimos 30 días)
Hi! If I have a vector like (5 8 7 9 8 4 7)' how can I create a matrix of N (for example 1000) columns formed by this vector? Thank you!

Respuesta aceptada

Ahmet Cecen
Ahmet Cecen el 23 de Abr. de 2015
Editada: Ahmet Cecen el 23 de Abr. de 2015
for a row vector concatenated vertically:
A=repmat(vector,[1000 1]);
for a column vector concatenated horizontally:
A=repmat(vector,[1 1000]);

Más respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by