Next: , Previous: sprand, Up: Function Reference


22.6.0.41 sprandn

— Function File: sprandn (m, n, d)
— Function File: sprandn (s)

Generate a random sparse matrix. The size of the matrix will be m by n, with a density of values given by d. d should be between 0 and 1. Values will be normally distributed with mean of zero and variance 1.

Note: sometimes the actual density may be a bit smaller than d. This is unlikely to happen for large really sparse matrices.

If called with a single matrix argument, a random sparse matrix is generated wherever the matrix S is non-zero.

     
     
See also: sprand.