added source code menghitung matriks