##### 22.6.2.45 sprandsym

— Function File: sprandsym (n, d)
— Function File: sprandsym (s)

> Generate a symmetric random sparse matrix. The size of the matrix will be n 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 in its lower triangular part.

> See also: sprand, sprandn.