Hi, I am writing a code for the following transformation
T[x;y]=[x+y:x+2y]
the code is
n=256;I=imread('fruit1.bmp');Red=I(:,:,1);Green=I(:,:,2);Blue=I(:,:,3);x(1)=Red(1);y(1)=Green(1);for i=1:15 x(i+1)=mod(x(i)+y(i),n) y(i+1)=mod(x(i)+2*y(i),n)end[x; y]
but I am getting the following results,which is definitley wrong.Can any one tells me why I am getting 255.
227 255 255 255 255 255 255 255 255 255 255 255 255 255 255 213 255 255 255 255 255 255 255 255 255 255 255 255 255 255 Column 16 255
Best Answer