octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: polar(i)


From: Nicholas Jankowski
Subject: Re: polar(i)
Date: Wed, 2 Dec 2015 16:06:49 -0500

On Wed, Dec 2, 2015 at 3:03 PM, Muhali <address@hidden> wrote:
Doug Stewart-4 wrote
> so to use polar notation of complex numbers use
>
> a=angle+mag*j

well, that IS confusing, at least for the mathematically trained eye. In the
complex plane your number a, as a complex number, would not be at (0,1) but
at (pi/2,1). It would have the "canonical" representation in polar form

arg(a) = 0.567 = "angle" ≠ pi/2
abs(a) = 1.86 = "magnitude" ≠ 1

So, whatever "angle" means in the form presently used by octave, it is not
the angle in the complex plane. What angle is it then? Or what plane?


my understanding was that octave stores all complex numbers in rectangular form. if it actually had a method of storing the argument portion we wouldn't have issues with branch cuts, etc for complex variables. because of this, polar plots would get really ambigous if you tried to feed it a rectangular form complex number and expect a real polar output.

so, think of it this way:  polar does not take a complex number and plot a complex number as you'd expect to see it.  It takes an angle-magnitude pair, in that order.  This way, you can give it values for angle that exceed +/-pi (or wherever the branch cut sets in). For some reason Matlab decided that it would accept [real(a+ib),imag(a+ib)] as a way of 'holding' the arg/mag values.  BUT even though stored in a complex number, those are not the proper complex numbers.  Octave is just riding along for compatibility's sake.

Nick J.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]