How to make a new matrix out of the combination of 12 matrix

조회 수: 1 (최근 30일)
AHMED ALBELTAGI
AHMED ALBELTAGI 2020년 8월 10일
댓글: Shae Morgan 2020년 8월 10일
I have 12 Matrix each of 401 * 101, i want to make a combination out of them where i can get a new matrix of 401 row where each new column in the new matrix a combination of different columns of the 12 matrix.

채택된 답변

Shae Morgan
Shae Morgan 2020년 8월 10일
편집: Shae Morgan 2020년 8월 10일
try concatenating them? Or do you want to add them across? You say "combination" do you mean an average or a sum? We need more information from your question for a good answer.
mat1=rand(401,101);
mat2=rand(401,101);
...
mat12=rand(401,101);
newmat=[mat1 mat2 mat12];
  댓글 수: 3
AHMED ALBELTAGI
AHMED ALBELTAGI 2020년 8월 10일
the values of the final matrix should be the sum of a different columns of the 12 matrix in order to could use them to find the best parameters in my work .
Shae Morgan
Shae Morgan 2020년 8월 10일
A=[1 1 1 ;2 2 2; 3 3 3];
B=[3 3 3; 2 2 2; 1 1 1];
C= A+B

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

추가 답변 (0개)

카테고리

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