Can any one see if there is something wrong here, I have been getting weird results from this code. When I run the code all results and formatting is as expected, yet when I print the result of a ‘set variable’ from that code, after it has run, the variable has changed and the input number sequence has skipped a number (see picture). Also in the full version of the code, when I print the result of a variable after it has run, not only is it different but it resets one of the other variables back to ‘not allocated’ as the colour of that variable returns to blue and printing it just return the variable name.
Here is part of the code and picture on my system. I have no other books open.
n = 4; a =
Partition[RandomSample[Range[n^2]], n]; k = a; Print[a]; Print[
MatrixForm[a]]; e = ToString[Column[a]]; f =
StringReplace[e, {"{" .. -> "(", "}" .. -> "),"}];
Print[f]; Print[a]; Print[k]
The code was run sequentially.
Paul.
