matGradMultMat in c (still problems)