void print_matrix(double** m, unsigned int nrows, unsigned int ncols) { unsigned int r, c; for (r = 0; r < nrows; r++) { for (c = 0; c < ncols; c++) { printf("%lf ", m[r][c]); } printf("\n"); } }