System.out.print("[");
if (col != cols - 1) {
System.out.print(" ");
}
}
System.out.print("]");
if (row == rows - 1) {
System.out.print("]");
}
System.out.println();
}
}
return result;
}
// Note: exclude_row and exclude_col starts from 1
public static Matrix subMatrix(Matrix matrix, int exclude_row, int exclude_col)
{
Matrix result = new Matrix(matrix.rows - 1, matrix.cols - 1);
++q;
}
}
++p;
}
}
return result;
}
return result;
}
}
return result;
}
}
}