Monday, June 9, 2008

Question #3 b











BigT for S=1
Octave commandoctave-3.0.0.exe:5>
octave-3.0.0.exe:5> bigT=255*ones(256);
octave-3.0.0.exe:6> bigT(30:79,64:191)=zeros(50,128);
octave-3.0.0.exe:7> bigT(50:199,111:146)=zeros(150,36);
octave-3.0.0.exe:8>
octave-3.0.0.exe:8> # as given from assignment question...
octave-3.0.0.exe:8>
octave-3.0.0.exe:8> for x=1:256
> for y=1:256
> xnew=x;
> ynew=mod((2*x+y),256)+1;
> newbigT(xnew,ynew)=bigT(x,y);
> endfor
> endfor
octave-3.0.0.exe:9>
octave-3.0.0.exe:9> imshow(newbigT)
octave-3.0.0.exe:10>

No comments: