It's always the little language-specific features that hang one up learning a new language.
Hello Fred,
just as a remark: Are you aware that you can simply wright:
isingarray = 2 RandomInteger[{0, 1}, {100, 100}] - 1;
Do [
temp = beta*(isingarray[[i + 1, j]] + isingarray[[i, j + 1]] + isingarray[[i - 1, j]] + isingarray[[i, j - 1]]);
z = E^temp + E^-temp; isingarray[[i, j]] = If[(E^-temp)/z > RandomReal[{0, 1}], 1, -1], {i, 2, 99},
{j, 2, 99}];
You do not need to use InitializationValue
and the like - (nearly) nobody needs those functions, and they are qualified as "Experimental".
Regards -- Henrik