I=imread('X.jpg');
[a b]=size(I);
figure;imshow(I);
j=rgb2ycbcr(I);
figure;
imshow(j);
ca=mat2cell(j,8*ones(1,size(j,1)/8),8*ones(1,size(j,2)/8),3);
p=1;
for c=1:size(ca,1)
for r=1:size(ca,2)
subplot(8,8,p);
imshow(ca{c,r});
p=p+1;
end
end
i get the following error: Index exceeds number of subplots. Any thoughts?