Please help me resolve this problem. When I use Plot function to draw graphics of function f as (1) , I got error
General::ivar: -9.99857 is not a valid variable. >> General::ivar: -9.99857 is not a valid variable. >> General::ivar: -9.99857 is not a valid variable. >> General::stop: Further output of General::ivar will be suppressed during this calculation. >>
But, If I draw graphics by using (2), it normally works. How can I do???
Thanks
hi Dang, I hope this serves you, check the difference between assignment and evaluation, I mean the sign = and : =
copy and paste the follow code in your mathematica
pts = Table[{i, j, i^2 + 1 + i*j + j^2}, {i, -10, 10}, {j, -10, 10}];
Res = NonlinearModelFit[pts[[1]],
a*ChebyshevT[5, x] + b*ChebyshevT[5, y] +
c*ChebyshevT[5, x]*ChebyshevT[5, y], {a, b, c}, {x, y}]
f = Res["Function"][x, y]
Plot3D[f, {x, -10, 10}, {y, -10, 10}, PlotStyle -> {Red}]
Here is the picture of performance of the code
Greetings
OMG! Thanks so much!

