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 waysarray = cat( 2, col1, col2, col3, col4, col5 );array = [ col1, col2, col3, col4, col5 ]; Related SolutionsMATLAB: Converting matrix to column col1 = array(:, 1);col2 = array(:, 2);col3 = array(:, 3);col4 = array(:, 4); MATLAB: How to combine multiple columns into a single column A=[ 1 2 3 4 5 6 7 8 9 1 2 3] out=A(:)orout=reshape(A,[],1) Related QuestionHow to divide array, that result would be like dividing columnsCombine 2 column matrix into 1 column matrixHow to divide every column of an array with another column of the same lengthCombine columns of multiple arrays using for loop
Best Answer