How to do the calculation of these three different size matrices ?

조회 수: 1 (최근 30일)
Akash Pal
Akash Pal 2022년 6월 28일
편집: Amritesh 2022년 6월 28일

채택된 답변

Amritesh
Amritesh 2022년 6월 28일
편집: Amritesh 2022년 6월 28일
First we have to create and initialise the arrays
C = [100,150];
B = [1,1;0.923077,0.615385;1,1;1,1;1,1];
D1 = [0,1,1,0,0,1.923077,3389.76;0,0,1,0,1,2,1793;0,1,1,0,0,1.923077,3389.76;0,0,1,0,1,2,1793];
D2 = [1,1,0,0,0,1.615385,5538.952;1,1,0,0,0,1.615385,5538.952;1,0,0,1,0,2,3601;1,0,0,1,0,2,3601];
A(:,:,1) = D1;
A(:,:,2) = D2;
Now,
F2 in first row of second column of D1 will correspond to A(1,2,1). So,
F2 = B[F2,C1]*C[D1]/A[1,6,D1] will be equivalent to
A(1,2,1) = B(2,1)*C(1)/A(1,6,1)
Similarly, you can calculate for other cells.
Hope this solves your issue.
  댓글 수: 5
Amritesh
Amritesh 2022년 6월 28일
편집: Amritesh 2022년 6월 28일
Here, k = 1 signify D1 and k = 2 signify D2.
Just try dry run of loop using pen and paper.
You can accept the answer if you understood.
Akash Pal
Akash Pal 2022년 6월 28일
Thank you .i understand it

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by