# image classification problem using Matlab?

I have an image classification problem. I have an image which spesify classes' labels using "imread" funtion of Matlab $(A=imread('r.bmp'))$ the output for example for 3 classes is as $$A= \begin{matrix} 1 & 1 & 1& 2& 2&2 &3&3& 3 \\ 1 & 1 & 1& 2& 2&2 &3&3& 3 \\ 1 & 1 & 1& 2& 2&2 &3&3& 3 \end{matrix}$$ How can I use "colormap" function of matlab to generate an image with specified color for each class??(i.e. each class in this image is specified with different color) can anyone help me to solve this problem? Thank you!

-
Maybe try this question in StackOverflow, as it is more a programming question (and SO is much more active) – Ander Biguri Dec 5 '12 at 8:26