Back to Sparse Matrices
sprand
Random sparse matrix with uniform [0,1) values.
Syntax
sprand(m: Int64, n: Int64, d: Float64) → r
Backends
TypeScriptnumwa
Description
Random sparse matrix with uniform [0,1) values.
Parameters
| Name | Description |
|---|---|
| m | Rows |
| n | Columns |
| d | Density (0 to 1) |
Returns
Examples
Try It
>> sprand(10, 10, 0.3)