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

  1. function c = cool(m)
  2. %COOL    Shades of cyan and magenta color map.
  3. %    COOL(M) returns an M-by-3 matrix containing a "cool" colormap.
  4. %    COOL, by itself, is the same length as the current colormap.
  5. %
  6. %    For example, to reset the colormap of the current figure:
  7. %
  8. %              colormap(cool)
  9. %
  10. %    See also HSV, GRAY, HOT, BONE, COPPER, PINK, FLAG, 
  11. %    COLORMAP, RGBPLOT.
  12.  
  13. %    C. Moler, 8-19-92.
  14. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  15.  
  16. if nargin < 1, m = size(get(gcf,'colormap'),1); end
  17. r = (0:m-1)'/max(m-1,1);
  18. c = [r 1-r ones(m,1)]; 
  19.