in reply to Re: Problems processing data for graph
in thread Problems processing data for graph

In this case adding 180 amounts to the first part of the standard binning transformation of subtracting the minimum value, and dividing by the bin size. In fact the OP's two routines ConvertToFromZero and BinAngles just spread this transformation over two subroutines.

the lowliest monk

  • Comment on Re^2: Problems processing data for graph

Replies are listed 'Best First'.
Re^3: Problems processing data for graph
by polettix (Vicar) on May 04, 2005 at 15:28 UTC
    Oh, I now see they're angles indeed. What I want to point out is that the OP is doing a 180 degrees translation, while he could mean to evaluate the Principal Argument, in which case should use the transformation I propose above.

    Of course, if the problem is only that of binning, for example to produce some graphics, it all reduces to choosing the correct x-axis; OTOH, if the OP wants to use these angles for some evaluations (e.g. sin, cos, stability of a system, whatever) he'd better use the correct angle wrapping function.

    Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

    Don't fool yourself.
      Thanks, that's good to know :)