Info
此问题已关闭。 请重新打开它进行编辑或回答。
how to place the elements of three matrices alternatively in on matrix using for loop in matlab?
2 次查看(过去 30 天)
显示 更早的评论
how to place the elements of three matrices alternatively in on matrix using for loop in matlab?
回答(1 个)
KSSV
2017-8-11
A = rand(2) ;
B = rand(2) ;
C = rand(2) ;
D1 = [A B C]
D2 = [A ;B ;C]
D3 = horzcat(A,B,C)
D4 = vertcat(A,B,C)
5 个评论
KSSV
2017-8-11
That's what I tell....here loop is not required...
a=[1 2;3 4] ;
b=[5 6;7 8] ;
c=[9 10;11 12] ;
d=[1 5 9;2 6 10;3 7 11;4 8 12] ;
a = a'; b = b' ; c = c' ;
D = [a(:) b(:) c(:)] ;
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!