a = [-ones(100,1);zeros(9900,1)];a = reshape(a(randperm(10000)),100,100);
A=randint(100);for I=1:100 for J=1:100 if A(I,J)==1 A(I,J)=-1; endendendA