MATLAB: Rgb2ind function not working

rgb2ind

A script I have calls up the rgb2ind function. The error message is 'Undefined function or method 'rgb2ind' for input arguments of type uint8'. However I've checked the function script and it says you should use uint8 and the input arguments that are used are uint8 with a map of 256. Am I missing something? I am fairly new to Matlab. There seems to be some problems with this function as at first it could not recognise it even though the function script is in the pathway. I'm using Matlab 2008b and this script has worked on the same version on other computers previously. Here is the section using the function: inimg = imread(imname); [img,imap] = rgb2ind(inimg,256);
Thanks in advance

Best Answer

That's odd. Make sure something screwy didn't happen with you path. What happens when you type
which rgb2ind
It should print the path to rgb2ind. If it says "'rgb2ind' not found." we may have to reset your paths.