Back to Sparse Matrices
sprandn
Sparse normally distributed random matrix
Syntax
S = sprandn(m, n, density)
Description
Generates an m-by-n sparse matrix with approximately density*m*n normally distributed nonzero entries.
Parameters
| Name | Description |
|---|---|
| m | Number of rows |
| n | Number of columns |
| density | Approximate density (0 to 1) |
Returns
Sparse random matrix with normal distribution
Examples
Try It
>> S = sprandn(100, 100, 0.05)