I am working on a problem where the pressure profile should be smooth. For this, the angle should be from 0
to 2pi
. But when I take the logarithm of some complex numbers, MATLAB displays the angle in pi
in the negative range pi
(clockwise).
For instance:
var_z = [20.0 + 0.6i, 20.0 - 0.6i];
za2 = -2.5000 + 0.5000i;
A = log (-(var_z-za2))
gives A = [3.11 - 3.13i, 3.11 + 3.091i]
, but if the angle was only in the counterclockwise direction (i.e. [0, 2pi]
), we would get [3.11 + 3.14i, 3.11 + 3.09i]
.
The latter result makes more sense in my situation, since it prevents the quick jump of pressure profiles. Is there any way to get MATLAB to use 0
to 2pi
to radians?
source
share