Complex numbers, abs results in mag, what results in phase?
Grant Edwards
grante at visi.com
Fri Nov 8 15:27:10 EST 2002
In article <081120020724547965%soufle at yahoo.com>, noyb wrote:
> In article <y9Cy9.3877$Bs5.116582 at news1.tin.it>, Alex Martelli
>>
>> > I realize the angle is atan(b,a) but I need to use my_complex_variable
>> > as input and not a,b.
>>
>> import math
>> def phase(mcv):
>> return math.atan2(mcv.imag, mcv.real)
>
> This seems obvious now!
It always does after Alex explains it.
--
Grant Edwards grante Yow! They don't hire
at PERSONAL PINHEADS,
visi.com Mr. Toad!
More information about the Python-list
mailing list