Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Generating random normal vectors and matrices

I'm new to sage, and am looking for the best ways to generate matrices and vectors with the following properties:

  • Matrices with independent normal entries. The default distribution of entries in matrices generated by random_matrix seems to be uniform over [-1,1]. Can that be changed?

  • Random (normal) vectors with fixed sparsity, in the sense that only a given number of the entries are non-zero.

Thanks for any assistance.