function  [c] = degree4(b)
% function  [c] = degree4(b)
%
% function to correct angle ambiguity in harmonic analysis of sea level
% or of currents.
% follows Mike Foremans programs
%
% fortran : degree(cyc) = (cyc-int(cyc)-sign(.5,cyc)+.5)*360.
%
%                           Julio Candela VII/93.

 c=zeros(size(b)); b=b(:);
 a = 360.*(b - fix(b) - .5.*sign(b) + .5.*ones(size(b)));
 c(:)=a;
