This first matrix table1 contains 5 names and 5 scenes.I need to perform some operations on this matrix and I have to obtain second matrix as shown in table2.
Diagonal elements of table2 should obtained by performing addition of 1st row,2nd row,3rd row..and so on.Remaining elements obtained by comparing 2 rows and summing them.Suppose take table1 as A matrix and table2 as B matrix.
OPERATION1:For diagonal elements
B(1,1)=7+7+7+1+0=22
B(2,2)=6+0+0+0+0=6
B(3,3)=0+6+0+4+0=10…….and so on
OPERATION2:For remaining elements
B(1,2)=MIN(A(1,1),A(2,1))+ MIN(A(1,2),A(2,2))+ MIN(A(1,4),A(2,4))+ MIN(A(1,5),A(2,5));
B(1,3)=..........
B(1,4)=..........
B(1,5)=..........
Table1:
Scene1 Scene2 Scene3 Scene4 Scene5
BASAVARAJ 7 7 7 1 0
MANOJ 6 0 0 0 0
NATESH 0 6 0 4 0
VIJAY 0 0 0 4 2
GOWDA 0 0 6 0 2
Table2:
BASAVARAJ MANOJ NATESH VIJAY GOWDA
BASAVARAJ 22 6 7 1 6
MANOJ 6 6 0 0 0
NATESH 7 0 10 4 0
VIJAY 1 0 4 6 2
GOWDA 6 0 0 2 8