How can I create a matrix of N columns by using just one vector.

1 vue (au cours des 30 derniers jours)
Tommaso Pellegrino
Tommaso Pellegrino le 23 Avr 2015
Réponse apportée : Theo le 23 Avr 2015
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!

Réponses (1)

Theo
Theo le 23 Avr 2015
vec= [5 8 7 9 8 4 7]';
vec_repeat=repmat(vec,1,1000);

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by