combining three matrices with different values to arrange one row after the other in the result matrix

조회 수: 1 (최근 30일)
How to make the row arrangements or reshaping
A=[1,2,3;4,5,6;7,8,9];
B=[1,2,1;1,3,1;1,4,1];
C=[2,2,2;3,3,3;4,4,4];
Result =[1,2,3;1,2,1;2,2,2;4,5,6;1,3,1;3,3,3;7,8,9;1,4,1;4,4,4];
I need the solution to use for larger elemental matices like 13919*10 matrices
Kind Regards
Raja Sekhar

채택된 답변

Navya Seelam
Navya Seelam 2020년 4월 3일
You can try the following
A=[1,2,3;4,5,6;7,8,9];
B=[1,2,1;1,3,1;1,4,1];
C=[2,2,2;3,3,3;4,4,4];
Result=[];
for i=1:3
Result=[Result;A(i,:);B(i,:);C(i,:)];
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by