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?

 采纳的回答

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

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Operators and Elementary Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by