MATLAB: Undefined function or method ‘unit8’

digital image processinghumorundefineduni8

I am getting this error when using unit8:
??? Undefined function or method 'unit8' for input arguments of type 'double'.
I have MATLAB Version 7.12.0.635 (R2011a) and unit8.m does not exist in MATLAB folder. Please help
Code mask=unit8(mask); eye_image=gray_image .* mask; figure, imshow(eye_image), hold on; title('Eye Image');

Best Answer

Perhaps the problem is with your typing or your spelling. ;-)
While unit8 does not exist, uint8 does.
MATLAB can be so picky.