How to combine multiple columns into array?

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?

 Akzeptierte Antwort

per isakson
per isakson am 2 Sep. 2020
Bearbeitet: per isakson am 2 Sep. 2020

0 Stimmen

Two ways
array = cat( 2, col1, col2, col3, col4, col5 );
array = [ col1, col2, col3, col4, col5 ];

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by