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

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