figure, image(I);
figure, imshow(I(:,:,1));
figure, imshow(I(:,:,2));
figure, imshow(I(:,:,3));
close all
whos
Name Size Bytes Class Attributes
I 480x640x3 921600 uint8
ans 1x30 60 char
help colormap
COLORMAP Color look-up table.
COLORMAP(MAP) sets the current figure's colormap to MAP.
COLORMAP('default') sets the current figure's colormap to
the root's default, whose setting is JET.
MAP = COLORMAP retrieves the current colormap. The values
are in the range from 0 to 1.
COLORMAP(AX,...) uses the figure corresponding to axes AX
instead of the current figure.
A color map matrix may have any number of rows, but it must have
exactly 3 columns. Each row is interpreted as a color, with the
first element specifying the intensity of red light, the second
green, and the third blue. Color intensity can be specified on the
interval 0.0 to 1.0.
For example, [0 0 0] is black, [1 1 1] is white,
[1 0 0] is pure red, [.5 .5 .5] is gray, and
[127/255 1 212/255] is aquamarine.
Graphics objects that use pseudocolor -- SURFACE and PATCH objects,
which are created by the functions MESH, SURF, and PCOLOR -- map
a color matrix, C, whose values are in the range [Cmin, Cmax],
to an array of indices, k, in the range [1, m].
The values of Cmin and Cmax are either min(min(C)) and max(max(C)),
or are specified by CAXIS. The mapping is linear, with Cmin
mapping to index 1 and Cmax mapping to index m. The indices are
then used with the colormap to determine the color associated
with each matrix element. See CAXIS for details.
Type HELP GRAPH3D to see a number of useful colormaps.
COLORMAP is an M-file that sets the Colormap property of a figure.
See also hsv, caxis, spinmap, brighten, rgbplot, figure, colormapeditor.
Reference page in Help browser
doc colormap
help cmap
cmap not found.
Use the Help browser Search tab to search the documentation, or
type "help help" for help command options, such as help for methods.
doc colormap
rcm = [ramp zeros(256,2)]
??? Undefined function or variable 'ramp'.
ramp = (0:255)'/255
ramp =
0
0.0039
0.0078
0.0118
0.0157
0.0196
0.0235
0.0275
0.0314
0.0353
0.0392
0.0431
0.0471
0.0510
0.0549
0.0588
0.0627
0.0667
0.0706
0.0745
0.0784
0.0824
0.0863
0.0902
0.0941
0.0980
0.1020
0.1059
0.1098
0.1137
0.1176
0.1216
0.1255
0.1294
0.1333
0.1373
0.1412
0.1451
0.1490
0.1529
0.1569
0.1608
0.1647
0.1686
0.1725
0.1765
0.1804
0.1843
0.1882
0.1922
0.1961
0.2000
0.2039
0.2078
0.2118
0.2157
0.2196
0.2235
0.2275
0.2314
0.2353
0.2392
0.2431
0.2471
0.2510
0.2549
0.2588
0.2627
0.2667
0.2706
0.2745
0.2784
0.2824
0.2863
0.2902
0.2941
0.2980
0.3020
0.3059
0.3098
0.3137
0.3176
0.3216
0.3255
0.3294
0.3333
0.3373
0.3412
0.3451
0.3490
0.3529
0.3569
0.3608
0.3647
0.3686
0.3725
0.3765
0.3804
0.3843
0.3882
0.3922
0.3961
0.4000
0.4039
0.4078
0.4118
0.4157
0.4196
0.4235
0.4275
0.4314
0.4353
0.4392
0.4431
0.4471
0.4510
0.4549
0.4588
0.4627
0.4667
0.4706
0.4745
0.4784
0.4824
0.4863
0.4902
0.4941
0.4980
0.5020
0.5059
0.5098
0.5137
0.5176
0.5216
0.5255
0.5294
0.5333
0.5373
0.5412
0.5451
0.5490
0.5529
0.5569
0.5608
0.5647
0.5686
0.5725
0.5765
0.5804
0.5843
0.5882
0.5922
0.5961
0.6000
0.6039
0.6078
0.6118
0.6157
0.6196
0.6235
0.6275
0.6314
0.6353
0.6392
0.6431
0.6471
0.6510
0.6549
0.6588
0.6627
0.6667
0.6706
0.6745
0.6784
0.6824
0.6863
0.6902
0.6941
0.6980
0.7020
0.7059
0.7098
0.7137
0.7176
0.7216
0.7255
0.7294
0.7333
0.7373
0.7412
0.7451
0.7490
0.7529
0.7569
0.7608
0.7647
0.7686
0.7725
0.7765
0.7804
0.7843
0.7882
0.7922
0.7961
0.8000
0.8039
0.8078
0.8118
0.8157
0.8196
0.8235
0.8275
0.8314
0.8353
0.8392
0.8431
0.8471
0.8510
0.8549
0.8588
0.8627
0.8667
0.8706
0.8745
0.8784
0.8824
0.8863
0.8902
0.8941
0.8980
0.9020
0.9059
0.9098
0.9137
0.9176
0.9216
0.9255
0.9294
0.9333
0.9373
0.9412
0.9451
0.9490
0.9529
0.9569
0.9608
0.9647
0.9686
0.9725
0.9765
0.9804
0.9843
0.9882
0.9922
0.9961
1.0000
rcm = [ramp zeros(256,2)]
rcm =
0 0 0
0.0039 0 0
0.0078 0 0
0.0118 0 0
0.0157 0 0
0.0196 0 0
0.0235 0 0
0.0275 0 0
0.0314 0 0
0.0353 0 0
0.0392 0 0
0.0431 0 0
0.0471 0 0
0.0510 0 0
0.0549 0 0
0.0588 0 0
0.0627 0 0
0.0667 0 0
0.0706 0 0
0.0745 0 0
0.0784 0 0
0.0824 0 0
0.0863 0 0
0.0902 0 0
0.0941 0 0
0.0980 0 0
0.1020 0 0
0.1059 0 0
0.1098 0 0
0.1137 0 0
0.1176 0 0
0.1216 0 0
0.1255 0 0
0.1294 0 0
0.1333 0 0
0.1373 0 0
0.1412 0 0
0.1451 0 0
0.1490 0 0
0.1529 0 0
0.1569 0 0
0.1608 0 0
0.1647 0 0
0.1686 0 0
0.1725 0 0
0.1765 0 0
0.1804 0 0
0.1843 0 0
0.1882 0 0
0.1922 0 0
0.1961 0 0
0.2000 0 0
0.2039 0 0
0.2078 0 0
0.2118 0 0
0.2157 0 0
0.2196 0 0
0.2235 0 0
0.2275 0 0
0.2314 0 0
0.2353 0 0
0.2392 0 0
0.2431 0 0
0.2471 0 0
0.2510 0 0
0.2549 0 0
0.2588 0 0
0.2627 0 0
0.2667 0 0
0.2706 0 0
0.2745 0 0
0.2784 0 0
0.2824 0 0
0.2863 0 0
0.2902 0 0
0.2941 0 0
0.2980 0 0
0.3020 0 0
0.3059 0 0
0.3098 0 0
0.3137 0 0
0.3176 0 0
0.3216 0 0
0.3255 0 0
0.3294 0 0
0.3333 0 0
0.3373 0 0
0.3412 0 0
0.3451 0 0
0.3490 0 0
0.3529 0 0
0.3569 0 0
0.3608 0 0
0.3647 0 0
0.3686 0 0
0.3725 0 0
0.3765 0 0
0.3804 0 0
0.3843 0 0
0.3882 0 0
0.3922 0 0
0.3961 0 0
0.4000 0 0
0.4039 0 0
0.4078 0 0
0.4118 0 0
0.4157 0 0
0.4196 0 0
0.4235 0 0
0.4275 0 0
0.4314 0 0
0.4353 0 0
0.4392 0 0
0.4431 0 0
0.4471 0 0
0.4510 0 0
0.4549 0 0
0.4588 0 0
0.4627 0 0
0.4667 0 0
0.4706 0 0
0.4745 0 0
0.4784 0 0
0.4824 0 0
0.4863 0 0
0.4902 0 0
0.4941 0 0
0.4980 0 0
0.5020 0 0
0.5059 0 0
0.5098 0 0
0.5137 0 0
0.5176 0 0
0.5216 0 0
0.5255 0 0
0.5294 0 0
0.5333 0 0
0.5373 0 0
0.5412 0 0
0.5451 0 0
0.5490 0 0
0.5529 0 0
0.5569 0 0
0.5608 0 0
0.5647 0 0
0.5686 0 0
0.5725 0 0
0.5765 0 0
0.5804 0 0
0.5843 0 0
0.5882 0 0
0.5922 0 0
0.5961 0 0
0.6000 0 0
0.6039 0 0
0.6078 0 0
0.6118 0 0
0.6157 0 0
0.6196 0 0
0.6235 0 0
0.6275 0 0
0.6314 0 0
0.6353 0 0
0.6392 0 0
0.6431 0 0
0.6471 0 0
0.6510 0 0
0.6549 0 0
0.6588 0 0
0.6627 0 0
0.6667 0 0
0.6706 0 0
0.6745 0 0
0.6784 0 0
0.6824 0 0
0.6863 0 0
0.6902 0 0
0.6941 0 0
0.6980 0 0
0.7020 0 0
0.7059 0 0
0.7098 0 0
0.7137 0 0
0.7176 0 0
0.7216 0 0
0.7255 0 0
0.7294 0 0
0.7333 0 0
0.7373 0 0
0.7412 0 0
0.7451 0 0
0.7490 0 0
0.7529 0 0
0.7569 0 0
0.7608 0 0
0.7647 0 0
0.7686 0 0
0.7725 0 0
0.7765 0 0
0.7804 0 0
0.7843 0 0
0.7882 0 0
0.7922 0 0
0.7961 0 0
0.8000 0 0
0.8039 0 0
0.8078 0 0
0.8118 0 0
0.8157 0 0
0.8196 0 0
0.8235 0 0
0.8275 0 0
0.8314 0 0
0.8353 0 0
0.8392 0 0
0.8431 0 0
0.8471 0 0
0.8510 0 0
0.8549 0 0
0.8588 0 0
0.8627 0 0
0.8667 0 0
0.8706 0 0
0.8745 0 0
0.8784 0 0
0.8824 0 0
0.8863 0 0
0.8902 0 0
0.8941 0 0
0.8980 0 0
0.9020 0 0
0.9059 0 0
0.9098 0 0
0.9137 0 0
0.9176 0 0
0.9216 0 0
0.9255 0 0
0.9294 0 0
0.9333 0 0
0.9373 0 0
0.9412 0 0
0.9451 0 0
0.9490 0 0
0.9529 0 0
0.9569 0 0
0.9608 0 0
0.9647 0 0
0.9686 0 0
0.9725 0 0
0.9765 0 0
0.9804 0 0
0.9843 0 0
0.9882 0 0
0.9922 0 0
0.9961 0 0
1.0000 0 0
diary