num2rgb edit page

derive RGB triplets from scalar input

Syntax

rgb  = num2rgb(val,cmap,varargin)

Input

val list of scalar values
cmap name of the colormap, either builtin or mtexColormap

Output

rgb n-by-3 rgb triplets

Options

N number of colors (default 255)
range [lower, upper] limit of value (default is min() max())