pert = zeros(256,8); for j = 0:255 tira = dec2bin(j,8); for k = 1:8 pert(j+1,k) = str2num(tira(k)); end end pert = 2*pert-1;