Code covered by the BSD License  

Highlights from
mapcolors

Be the first to rate this file! 12 Downloads (last 30 days) File Size: 1.59 KB File ID: #29064
image thumbnail

mapcolors

by

 

Create a custom RGB colormap by interpolating between two pre-defined extremes.

| Watch this File

File Information
Description

  MAPCOLORS Create a custom RGB colormap by interpolating between two pre-defined
  extremes.
 
  MAPCOLORS(START,FINISH) returns a 64 x 3 matrix containing RGB
  intensities linearly interpolated between the values specified in START and FINISH, which are 3-element vectors containing RGB intensities 0-255.
  
  MAPCOLORS(START,FINISH,NBITS) returns an nBITS x 3 matrix instead.
 
  EXAMPLE: To recreate Matlab's built-in 'winter' colormap, execute the following:
 
  wintermap = mapcolors([0 0 255],[0 255 127.5]);
  
       Observe that:
  size(wintermap) % >> [64 3]
  wintermap(1,:) % >> [0 0 1]
  wintermap(64,:) % >> [0 1 0.5]
 
  See also COLORMAP

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us