public static double[][] multiplyMatrix(double[][] matrix1, double[][] matrix2) {
// As both arrays are square and the same size, the row size represents the row size and column size for both matrices
int dimension = matrix1.length;
double[][] matrix3 = new double[dimension][dimension];
for (int i = 0; i < dimension-1; i++) {
for (int j = 0; j < dimension-1; j++) {
for (int k = 0; k < dimension-1; j++) {
matrix3[i][j] += matrix1[i][k] * matrix2[k][j];
}
}
}
return matrix3;
}
这非常令人沮丧。