shiftval=-1
shiftval(2:2*n:2)=1
If we draw out the scenario, this seems to be the wrong
order (-1 means shifting the matrix to the right?). However
the code does give the correct answer. But if we change to
shiftval=1
shiftval(2:2*n:2)=-1
it still gives the same number. Looking into the program,
the reason seems to be that the problem has mirror reflection
symmetry, and although the shifting order was wrong (?) in the old
code, it merely mirror-reflects the variable labels. The number
in the middle is still correct.
----
NOTE: This message was sent using a WWW form. The address liju99
was typed manually, and may easily be incorrect.
In-Reply-To: 9703031715.AA04732@arachnophobia.MIT.EDU