How to combine multiple columns into array?

214 vues (au cours des 30 derniers jours)
pink flower
pink flower le 2 Sep 2020
Modifié(e) : per isakson le 2 Sep 2020
I have 5 columns and I would like to join them and form a matrix with n rows and 5 columns. How can I do this?

Réponse acceptée

per isakson
per isakson le 2 Sep 2020
Modifié(e) : per isakson le 2 Sep 2020
Two ways
array = cat( 2, col1, col2, col3, col4, col5 );
array = [ col1, col2, col3, col4, col5 ];

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by