public MaTrix1 Chia(MaTrix1 other) { int[,] a = new int[Hang, Cot]; for (int i = 0; i < soHang; i++) { for (int j = 0; j < soCot; j++) { a[i, j] = this.Get(i, j) / other.Get(i, j); } } return(new MaTrix1(a)); }
public MaTrix1 Add(MaTrix1 other) { if (!this.KiemTra(other)) { throw new Exception("Loi khong cong dc"); } int[,] result = new int[Hang, Cot]; for (int i = 0; i < soHang; i++) { for (int j = 0; j < soCot; j++) { result[i, j] = this.Get(i, j) + other.Get(i, j); } } return(new MaTrix1(result)); }