You could use mat2gray() here, but you don't want to use the default syntax.
Let's back up and explain why you would think you might. MATLAB/IPT does not have any included HSI conversion tools. All the tools that exist are various and have differing conventions than the built-in HSV conversion tools do. While MATLAB's rgb2hsv() returns hues normalized between 0 and 1, most other tools return hues in degrees from 0 to 360. In such a case, the hue channel needs to be normalized. If the S and I channels are not normalized, they would also need to be.
The problem with using mat2gray() is that it unless you specify the limits, it will normalize the image to its extrema. If you have an image containing very few hues, you will end up stretching out the hues such that it then spans all hues.
A = imread('cameraman.tif');
Ac = imread('cmantifgradbg.png');
B(:,:,1) = mat2gray(B(:,:,1));
Obviously, this is a significant alteration.
In order to avoid this, normalize to the standard extent of the channel (i.e. [0 360]). While you can do this using the explicit syntax for mat2gray(), it's not really necessary. A simple division will suffice.
In these examples, I used the HSI conversion tools found here.