Ask Your Question

3dplot of modulus of complex function

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

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

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

tmonteil gravatar image

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

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


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

Seen: 438 times

Last updated: Sep 04 '13