MATLAB: The question is if a=[1 2;3 4],b=[5 6;7 8],c=[9 10;11 12] the resultant matrix should be d=[1 5 9;2 6 10;3 7 11;4 8 12] this should be done using for loop

MATLAB

my question is if a=[1 2;3 4],b=[5 6;7 8],c=[9 10;11 12]
the resultant matrix should be d=[1 5 9;2 6 10;3 7 11;4 8 12] this should be done using for loop?

Best Answer

Maybe
d = [a(:) b(:) c(:)]
?
Best wishes
Torsten.