Message Boards Message Boards

0
|
3282 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Problem with Plot3D

Posted 11 years ago


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
POSTED BY: Dang Thanh
2 Replies
Posted 11 years ago
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
POSTED BY: Luis Ledesma
Posted 11 years ago
OMG! Thanks so much!
POSTED BY: Dang Thanh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract