Combine columns from different matrix
Show older comments
Hello everyone : I need to combine three arrays
A=[2 4 5; B=[4 6 3; C=[5 2 5;
4 6 8; 2 4 6; 2 4 5;
1 4 7;]; 0 4 5;]; 1 3 5;];
to
output[ 2 4 5 4 6 2 5 3 5;
4 2 2 6 4 4 8 6 5;
1 0 1 4 4 3 7 5 5;]
output[column1 from A , column1 from B , Column1 form C,column2 from A, Column2 from B, colomn2 from c,column 3 from A, ........];
Accepted Answer
More Answers (1)
Or simply reshape
out = reshape(vertcat(A,B,C), 3, [])
Categories
Find more on Loops and Conditional Statements 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!