Could anyone help to combine three matrix into single matrix.

조회 수: 2 (최근 30일)
jaah navi
jaah navi 2019년 2월 20일
댓글: jaah navi 2019년 2월 20일
I have three matrixes A with different number present in the first column.But the number present in second column of all matrices are same.
A=[1 0 0;
2 0 0;
3 0 0]
A=[4 0 0 ;
5 0 0;
6 0 0]
A=[7 0 0;
8 0 0;
9 0 0]
I want to combine the three matrices into an single matrix such that the output should be A=[1 4 7;
2 5 8;
3 6 9].
Could anyone please help me on this.

답변 (1개)

Torsten
Torsten 2019년 2월 20일
A_combined = [A1(:,1),A2(:,1),A3(:,1)];
  댓글 수: 3
Torsten
Torsten 2019년 2월 20일
It's not possible that they all are named "A" because you would overwrite one matrix by the other if you implemented it this way in MATLAB.
jaah navi
jaah navi 2019년 2월 20일
With respect to the code i am running the code with respect to three particles.
The three A matrices corresponds to each particles.
Now I need to combine the first column of all three particles into single A matrix.

댓글을 달려면 로그인하십시오.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by