Reduce the number of colors by converting to indexed image

Load an image and convert it to index image with lower number of colors

Other languages:
A=imread('kytka256.jpg');
[AInd,map]=rgb2ind(A,7); % 7 colors
imshow(AInd, map); %Every row from map refers to one color in RGB format (3 columns)
Something is wrong? Let us know right here