map = hsv
map = hsv(m)
hsv
hsv
is used in conjunction with colormap
to specify a colormap which varies the hue component of the hue-saturation-value color model. The colors begin with red, pass through yellow, green, cyan, blue, magenta, and return to red. The map is particularly appropriate for displaying periodic functions.
hsv(m)
returns an m
-by-3 matrix containing an hsv
colormap.
hsv
, by itself, is the same as hsv(64).
produceformat rat
M = hsv(19)
The rows ofM =
1 0 0
1 6/19 0
1 12/19 0
1 18/19 0
14/19 1 0
8/19 1 0
2/19 1 0
0 1 4/19
0 1 10/19
0 1 16/19
0 16/19 1
0 10/19 1
0 4/19 1
2/19 0 1
8/19 0 1
14/19 0 1
1 0 18/19
1 0 12/19
1 0 6/19
M
that contain just 0s and 1s represent the basic colors red, yellow, green, cyan, blue, magenta and red again. The other rows represent intermediate colors.
hsv(m)
is the same as hsv2rgb(
[h ones(m,2)
])
where h
is the linear ramp,
h = (0:m-1)'/(m-1);
colormap
,hsv2rgb
,rgb2hsv
bone
,cool
,copper
,flag
,gray
,hot
,jet
,pink
,prism
,white
(c) Copyright 1994 by The MathWorks, Inc.