Update matsolve.c