Merge two columns into one column?
Show older comments
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?
Accepted Answer
More Answers (1)
>> A = [123,321,20001130];
>> B = [456,654,32378];
>> F = @(n)arrayfun(@int2str,n,'UniformOutput',false);
>> cellfun(@(a,b)str2double([a,b]),F(A),F(B))
ans =
123456 321654 2000113032378
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!