Zig-zag matrix: Difference between revisions

Line 1,703:
</pre>
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
Rule-based implementation, the upper-left half is correctly calculated using a direct formula. The lower-right half is then 'mirrored' from the upper-left half.
<lang Mathematica>ZigZag[size_Integer/;size>0]:=Module[{empty=ConstantArray[0,{size,size}]},
Anonymous user