Ask Your Question
0

3dplot of modulus of complex function

asked 2013-09-04 13:55:44 +0100

david8381 gravatar image

Even though abs(x+I*y) should always be real... I get the following error:

plot3d(abs(x+I*y),(x,-5,5),(y,-5,5)) ERROR: unable to coerce to a real number

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-09-04 14:13:04 +0100

tmonteil gravatar image

updated 2013-09-04 14:20:53 +0100

This is may not be a good answer explaining why is the Symbolic Ring not working here, but at least a workaround: forget about symbolic functions and use Python lambda functions instead:

sage: plot3d(lambda x,y: abs(x+I*y), (x,-5,5), (y,-5,5))

or even:

sage: plot3d(lambda x,y: abs(x+I*y), (x,-5,5), (y,-5,5), adaptive=True)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-09-04 13:55:44 +0100

Seen: 489 times

Last updated: Sep 04 '13