Create a two-dimensional array at runtime: Difference between revisions

m
(Added Arturo implementation)
Line 1,442:
> gc(); # force a garbage collection; may or may not actually collect the array, but it will be eventually</lang>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>arrayFun[m_Integer,n_Integer]:=Module[{array=ConstantArray[0,{m,n}]},
arrayFun[m_Integer,n_Integer]:=Module[{array=ConstantArray[0,{m,n}]},
array[[1,1]]=RandomReal[];
array[[1,1]]
1,111

edits