Revision history [back]

Absolute value of complex numbers in 3D plot

When I try to make a 3d plot with complex numbers in it, such as this one: plot3d(1+x+abs(iomega), (x,0,5), (omega,0,5), viewer='tachyon') I get errors saying TypeError: unable to coerce to a real number On another one I got TypeError: Unable to convert 0.0345000000000000I to float Why is this happening?

Absolute value of complex numbers in 3D plot

When I try to make a 3d plot with complex numbers in it, such as this one: plot3d(1+x+abs(iomega), one:

plot3d(1+x+abs(i*omega), (x,0,5), (omega,0,5), viewer='tachyon')


I get errors saying saying

TypeError: unable to coerce to a real number


On another one I got got

TypeError: Unable to convert 0.0345000000000000I 0.0345000000000000*I to float


Why is this happening?

 3 No.3 Revision slelievre 10403 ●9 ●108 ●210 http://carva.org/samue...

Absolute value of complex numbers in 3D plot

When I try to make a 3d plot with complex numbers in it, such as this one:

plot3d(1+x+abs(i*omega), (x,0,5), (omega,0,5), viewer='tachyon')


I get errors saying

TypeError: unable to coerce to a real number


On another one I got

TypeError: Unable to convert 0.0345000000000000*I to float


Why is this happening? happening?

Absolute value of complex numbers in 3D plot

When I try to make a 3d plot with complex numbers in it, such as this one:

plot3d(1+x+abs(i*omega), (x,0,5), (omega,0,5), viewer='tachyon')


I get errors saying

TypeError: unable to coerce to a real number


On another one I got

TypeError: Unable to convert 0.0345000000000000*I to float


Why is this happening?

EDIT: Thanks for slelievre, lambda makes minimal example work. However, the original problem (I wanted to plot frequency responses) gives another error. Here is the original problem:

G_do_ideal_qn = -31.6656111462951*(0.0345000000000000*I*omega - 359.196869250000)/(-0.000389160000000000*omega^2 + 1.03531167486000*I*omega + 180.342274500000)


Tried to plot with

plot3d(lambda omega, V_C: 20*log(abs(G_do_ideal_qn), 10), (omega, 10, 100e3), (V_C, 0, 400))


Gives error

TypeError: unable to simplify to float approximation