home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 2.ddi / MUTOOLS1.DI$ / NEGANGLE.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  303 b   |  16 lines

  1. % function y = negangle(x)
  2. %
  3. %   Calculate the angle of X, in the range 0 to -2 pi radians.
  4.  
  5. function y = negangle(x)
  6. if nargin ~= 1,
  7.     disp('usage: y = negangle(x)')
  8.     return
  9.     end
  10.  
  11. y = angle(x);
  12. ind = find(y > 0);
  13. y(ind) = y(ind) - 2*pi;
  14. %
  15. % Copyright MUSYN INC 1991,  All Rights Reserved
  16.