| Author |
Comment/Response |
jf
|
11/24/12 1:11pm
I'm a little surprised Plot3D didn't give the same complaints.
NIntegrate pre-evaluates its first argument without numbers, looking for ways to speed it up.
If the arguments it sees are undefined variables, it complains.
The usual workaround is to move the first argument outside in its own function and make that function work only when called with numbers. See the attached notebook.
Example:
spfunc[x_?NumericQ, y_?NumericQ] := NIntegrate[{f[x, y, t], 1}, {t, 0, 10} ]
StreamPlot[spfunc[x, y] , {x, -1, 1}, {y, -1, 1}]
See http://support.wolfram.com/kb/3820
Attachment: NInt142305.nb, URL: , |
|