Just dive into the code - they gave it to you. Just put the cursor on
the function rgb2hsv() in your code and type control-d. Here's the
first part (the comments):
(By the way, here's another site you may like: http://www.easyrgb.com/index.php?X=MATH)
%RGB2HSV Convert red-green-blue colors to hue-saturation-value.
% H = RGB2HSV(M) converts an RGB color map to an HSV color map.
% Each map is a matrix with any number of rows, exactly three
% and elements in the interval 0 to 1. The columns of the input
% M, represent intensity of red, blue and green, respectively. The
% columns of the resulting output matrix, H, represent hue,
% and color value, respectively.
% HSV = RGB2HSV(RGB) converts the RGB image RGB (3-D array) to the
% equivalent HSV image HSV (3-D array).
% CLASS SUPPORT
% If the input is an RGB image, it can be of class uint8, uint16,
% double; the output image is of class double. If the input is a
% colormap, the input and output colormaps are both of class double.
% See also HSV2RGB, COLORMAP, RGBPLOT.
% Undocumented syntaxes:
% [H,S,V] = RGB2HSV(R,G,B) converts the RGB image R,G,B to the
% equivalent HSV image H,S,V.
% HSV = RGB2HSV(R,G,B) converts the RGB image R,G,B to the
% equivalent HSV image stored in the 3-D array (HSV).
% [H,S,V] = RGB2HSV(RGB) converts the RGB image RGB (3-D array) to
% the equivalent HSV image H,S,V.
% See Alvy Ray Smith, Color Gamut Transform Pairs, SIGGRAPH '78.
% Copyright 1984-2006 The MathWorks, Inc.
% $Revision: 188.8.131.52 $ $Date: 2006/10/02 16:33:03 $