MAT #TRANSFORM X BY <expression(X#,I#,J#)> or MAT #TRANSFORM X BY Y AND <expression(X#,Y#,I#,J#)> works as MAT TRANSFORM but allows a larger set of functions to be used. In fact, all features of the VAR operation are available except those related to data sets like lags and leads, etc. Thus, for example, temporary functions defined in the edit field library functions (on disk), and random deviates (rand function etc.) are permitted. Examples: m=8 / Generating m x m matrix A MAT A=ZER(m,m) / with all elements MAT #TRANSFORM A BY probit(rand(1995)) / independently distributed as N(0,1) MAT C=ZER(m,m) / Generating m x m matrix C MAT #TRANSFORM C BY C(I#,J#) / of binomial coefficients MAT #TRANSFORM C BY RECURRENCE N transforms matrix C by a recurrence relation N of two integer variables. N must be defined like a temporary function in editorial computing in the form N(m,n):=function(m,n,N(i1,j1),N(i2,j2),...) where i1,i2,...<m, j1,j2,...<=n . Before using this MAT #TRANSFORM operation the initial conditions must be given by filling certain first rows/columns/elements with suitable values. The starting position of iteration is supplied by a START=i0,j0 specification where i0,j0 are row and column indices. Rows and columns are implicitly labelled by 0,1,2,... (i.e. starting from 0 instead of 1). Operations MAT RLABELS NUM(0) TO C MAT CLABELS NUM(0) TO C are available for such labelling. If C is a column vector, also functions of one integer variable are allowed. ........................................................................ Example: Stirling numbers of the second kind S2(n,k):=S2(n-1,k-1)+k*S2(n-1,k) Initial condition S2(n,1)=1 n=10 k=n / Numbers for n=1,..,10 k=1,...,10 to be computed MAT A=ZER(n+1,k+1) / Matrix A initialized by 0's MAT C=CON(n,1) MAT A(2,2)=C / Column 2 (corresponding to k=1) filled with 1's MAT RLABELS NUM(0) TO A MAT CLABELS NUM(0) TO A /MATSHOW A,12 / See matrix A in initial state START=2,2 / Starting point for recursion MAT #TRANSFORM A BY RECURRENCE S2 /MATSHOW A,12345 / See the table of Stirling numbers ........................................................................ MAT #TRANSFORM X BY #RAND(seed_number) works as MAT #TRANSFORM X BY RAND(seed_number) but is about two times faster. MAT #TRANSFORM X BY #DISTR(P,seed_number) transforms X to a random matrix with elements as a sample from a discrete distribution defined by a matrix P. P is defined as in the command TRANSFORM <data> BY #DISTR(P) (See TRANSFORM?). A = More about additional MAT #operations M = More about MAT operations