mapcolors

Create a custom RGB colormap by interpolating between two pre-defined extremes.
483 download
Aggiornato 17 ott 2010

Visualizza la licenza

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

Cita come

Scott McKinney (2025). mapcolors (https://www.mathworks.com/matlabcentral/fileexchange/29064-mapcolors), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2009a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Colormaps in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0