randn(k,n)

import java.util.*; Random r = new Random(); g = r.nextGaussian();

[dan@localhost ECC]$ date +%s 1032283634 [dan@localhost ECC]$ ./randGen 0 10 1032283634 0.293738 0.003762 0.657379 0.566909 0.247530 0.053829 0.768945 0.506524 0.983858 0.380157 [dan@localhost ECC]$ date +%s 1032283655 [dan@localhost ECC]$ ./randGen 1 10 1032283655 -1.095767 1.311092 1.863238 0.743954 1.141838 1.354877 -0.840446 -0.796139 1.132950 0.209844To learn something about this data, let's import it into matlab and plot a little. We'll do it by saving it in to a file, like,

[dan@localhost ECC]$ date +%s 1032311720 [dan@localhost ECC]$ ./randGen 0 100000 1032311720 > uniform.txt [dan@localhost ECC]$ ./randGen 1 100000 1032311720 > gaussian.txtTo then import this in to matlab, you could then type

>> u = load('uniform.txt'); >> g = load('gaussian.txt');Now, you can proceed with the explorations suggested in Probability Distributions.

Dan Spielman Last modified: Wed Apr 14 12:56:51 EDT 2004