THe code above will of course not run as given (no definition for h
). Also there is a typ0 {g.g0}
where certainly you want a comma separator {g,g0}
. The upshot is I cannot replicate the actual issue. I will take a guess that first you need to make g
into a function that only exists for explicitly numeric input. That can be done as below.
g[x_?NumberQ, y_?NumberQ] = ...
There seem to be other issues (e.g. g
does not seem to be a variablebut rather a function). Really you should post with full input to replicate the problem; this is simply too confused as it stands.