home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / ELMAT.DI$ / FLIPLR.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  354 b   |  15 lines

  1. function y = fliplr(x)
  2. %FLIPLR    Flip matrix in the left/right direction.
  3. %    FLIPLR(X) returns X with row preserved and columns flipped
  4. %    in the left/right direction.
  5. %    
  6. %    X = 1 2 3     becomes  3 2 1
  7. %        4 5 6              6 5 4
  8. %
  9. %    See also FLIPUD, ROT90.
  10.  
  11. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  12.  
  13. [m,n] = size(x);
  14. y = x(:,n:-1:1);
  15.