This morning I figured out how to plot the modulus of a complex function in
sage. In my travails I wondered why the first snippet works, but the
second does not? Is there any easy way to make the second snippet work?
#Plot the modulus of the function, works
var('z',domain=CC)
var('x y', domain=RR)
var('rp ip')
z=x+i*y
rp = (2+z.conjugate()+z^3).real()
ip = (2+z.conjugate()+z^3).imag()
m(x,y) = sqrt(rp^2+ip^2)
plot3d(m(x,y).simplify(),(x,-1.5,1.5),(y,-1.5,1.5))
My question is, why doesn't this work?
#Plot the modulus of the function, fails
var('z',domain=CC)
var('x y', domain=RR)
z=x+i*y
m(x,y) = abs(2+z.conjugate()+z^3)
plot3d(m(x,y),(x,-1.5,1.5),(y,-1.5,1.5))
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.