(89) :newMat(rows, columns)
This creates a matrix with numelements elements, in which every element is 0.
:randMat(r,c) :Func :Local l,i,j :newMat(r,c)→l :For i,1,r ::For j,1,c :::rand(r*c)→l[i,j] ::EndFor :EndFor : :Return l :EndFunc
This program returns a matrix with the specified dimensions and that has a random value in each element. The random numbers can be from 1 to R*C.
NOTE: All variables inside a Function must have the "Local" declaration, otherwise it will look for those variables as if they were global variables outside of the Function.