Group Abstract Group Abstract

Message Boards Message Boards

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

Comparing numerical and exact solutions in the same 3D plot?

Posted 4 years ago

Suppose that we have:

uexact[x_, t_] := x*t;
unumeric[x_, t_] := 0.0000001 + x*t; 
Plot3D[{unumeric[x, t], uexact[x, t]}, {x, 0, 2}, {t, 0, 2}]

**

  • How to create a 3d plot as follows:

** enter image description here

  • Besides, what are the best ways to comparing numerical and exact solutions in the same 3D plot? Could you share your experience?
POSTED BY: a b
2 Replies
Posted 4 years ago

This seems like a homework problem. What have you tried?

POSTED BY: Rohit Namjoshi
Posted 4 years ago

It's not homework.

uexact[x_, t_] := x*t;
unumeric[x_, t_] := 0.0000001 + x*t; 
    Show[ Plot3D[ uexact[x, t], {x, 0, 2}, {t, 0, 2}], Graphics3D[{AbsolutePointSize[4], Point[ Flatten[ Table[{x, t, unumeric[x, t]}, {x, 0, 2, 0.125}, {t, 0, 2, 0.125}], 1]]}]]

I achieved it. But how to add the legends?

POSTED BY: a b
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard