Code covered by the BSD License  

Highlights from
MATLAB Versions of NOVAS

from MATLAB Versions of NOVAS by David Eagle
Several NOVAS Fortran subroutines have been ported to MATLAB.

anmp (a)
function w = anmp (a)

% normalize angle into the range -pi <= a < +pi.

% ported from NOVAS 3.0

%%%%%%%%%%%%%%%%%%%%%%%

w = mod(a, 2.0 * pi);

if (abs(w) >= pi)
    
    w = w - sign(a) * (2.0 * pi);
    
end

Contact us