I have this problem in Mathematica :
L=16;
f[x_]:=-x;
mlat = Table[2 RandomInteger[] - 1, {L}, {L}];
ArrayPlot[mlat, ColorFunction -> (If[# == 1, White, Black] &), Mesh -> All]
and I did this in Matlab:
L=16;
f=@ (x) -x;
mlat=2*randint(L,L)-1;
if mlat(:,:)==1
plot(mlat,'ws')
hold on
else
plot(mlat,'ks')
hold off
grid on
end
but I can't get the graph.