First time here? Check out the FAQ!

Ask Your Question
0

3dplot of modulus of complex function

asked 11 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 11 years ago

tmonteil gravatar image

updated 11 years ago

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)
Preview: (hide)
link

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: 11 years ago

Seen: 512 times

Last updated: Sep 04 '13