# MATLAB: Pixels and their locations

imageImage Processing Toolboxlocationpixelsshow

For instance, I have a grayscale image. For that image, say that I'm interested in viewing pixels with intensity value 77. For that, I did the following:
    imshow(I(I==77))
But, in this case, I got a figure with something like a vertical thin line and doesn't show a meaningful image.
It seems we should refer to the locations of those pixels.
What should we do in this case in order to retrieve a meaningful image showing the pixels of interest?
Thanks.

mask = (I==77); C% Create binary (logical) mask.maskedImage = I .* uint8(mask);  % Multiply mask by image.imshow(maskedImage); % Display maskedImage