MATLAB: How to combine multiple columns into array

MATLAB: How to combine multiple columns into array

arraycolumnsmerge

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?

Best Answer

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

    Your email address will not be published. Required fields are marked *