I create the following set of data:
newmatrix = Flatten[Table[{t, v, new[t, v]}, {t, 0, 2 Pi, Pi/4}, {v, 0, 1,
0.01}], 1]
where
new[t_, v_] = t^2 + v^2
Then I defined a function that interpolate the previous data set:
newfun = Interpolation[newmatrix, Method -> "Hermite"]
I can plot it:
Now I need to integrate the interpolation function in one of the two variables like:
NIntegrate[newfun[t, v], {t, 0, 1}, AccuracyGoal -> 5]
but it doesen't work.
The error code is:
NIntegrate::inumr: The integrand <<1>> has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,0.785398}}.
Where is my error ?
Thanks for any tips and helps!
v
. Trynewfun[1, v]
and you'll why. $\endgroup$newfun[1, v]
before you callNIntegrate
you'll see the problem. You need to have a numerical value forv
inside NIntegrate call. $\endgroup$