FUNCTION REFERENCE

gray

Grayscale colormap from black to white.

Grayscale colormap from black to white.

Syntax

map = gray(n)

Returns n RGB rows with equal components rising linearly from 0 to 1 (256 rows by default).

Example

gray(3)   % [0 0 0; 0.5 0.5 0.5; 1 1 1]

Differences from MATLAB: none known.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.