* Monte Carlo example, Kennedy # 6, p. 331, solution p. 384 set nocolor set maxcol=5010 sample 1 20 * XM and XV are matrices with one row and 5000 columns dim xm 1 5000 dim xv 1 5000 do #=1,5000 * Kennedy suggests drawing from, e.g. N(2,4) genr x=2+nor(2) stat x/mean=xm:# var=xv:# endo * Note the next two commands have "primes" at the end * This represents matrix transposition (interchange * rows and columns) matrix xm=xm' matrix xv=xv' sample 1 5000 file screen b:mc2.out stat xm xv