Ch-3.4-exam-8-Final-허재석

1903 days ago by matrix

B=matrix(4, 4, [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]) E=matrix(4, 4, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0 , 1, 0, 1, 1, 0, 1]) print E*B print print B*E 
       
[1 1 1 1]
[2 2 2 2]
[3 3 3 3]
[7 7 7 7]

[2 2 1 1]
[4 4 2 2]
[6 6 3 3]
[8 8 4 4]
[1 1 1 1]
[2 2 2 2]
[3 3 3 3]
[7 7 7 7]

[2 2 1 1]
[4 4 2 2]
[6 6 3 3]
[8 8 4 4]