home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 8.ddi / SIGNAL.DI$ / RCUNWRAP.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  407 b   |  14 lines

  1. function y = rcunwrap(x)
  2. %RCUNWRAP Phase unwrap utility used by CCEPS.
  3. %    RCUNWRAP(X) unwraps the phase and removes phase corresponding
  4. %    to integer lag.  See also: UNWRAP, CCEPS.
  5.  
  6. %    L. Shure, 1988, revised 3-30-92, LS with help from PL.
  7. %       Copyright (c) 1984-92 by the MathWorks, Inc.
  8.  
  9. n = max(size(x));
  10. y = unwrap(x);
  11. nh = fix((n+1)/2);
  12. y(:) = y(:)' - pi*round(y(nh+1)/pi)*(0:(n-1))/nh;
  13.  
  14.