2.42.24 Build a matrix with a function : makemat
makemat takes three arguments :
a function of two variables j and k which
should return the value of aj,k, the element of
row index j and column index k of the matrix to be built.
- two integers n and p.
makemat returns the matrix A=(aj,k)
(j=0..n−1 and k=0..p−1) of dimension n × p.
or first define the h function:
Note that the indices are counted starting from 0.