% randSeed=6;
% rand('state', randSeed);
randSeed=9;
rand('state', randSeed);

T1=rand(res,res);
% % 
prob=0.65
II=find(T1<=prob);  
% % 
T1(:,:)=zeros(res,res);
T1(II)=1;
% 
%0 is white, 1 is black
%set nord boundary and south boundary to 1
T1(1,:)=1;
T1(size(T1,1),:)=1;
%set left boundary and right boundary to 1
T1(:,1)=0;
T1(:,size(T1,2))=0;

