MATLAB: Merge two columns into one column combinemerge I have two columns that i want to merge into one column. Meaning i want A=[123; 321] and B=[456; 654] to be merged/combined into a new column C=[123456; 321654] I this possible? Best Answer C = 10.^ceil(log10(B)).*A + B; Related SolutionsMATLAB: How to aggregate two columns One approach:A = [20100101;20100102];B = [020510000;020510040];ABS = sprintf('%d%09d\n', [A, B]'); % String RepresentationABN = str2num(sprintf('%d%09d\n', [A, B]')) % Numeric Conversion MATLAB: Taking two matrices and outputting as a single number with one matrix being the integer value and one being the decimal value. a = [1 2 3] ;b = [4 5 6] ;iwant = sum(10.^(length(a)-1:-1:0) .* a)+ sum(10.^(length(b)-1:-1:0) .* b)/10^length(b) ; Related QuestionHow to combine all columns of an array into one columnHow do you create an array with multiple rows in one lineIs there a way to floor to a specified number of digitsUpdate time/date in a for loop
Best Answer