`(y)=sprandn(rows, columns, density)`

Inputs | |

`rows` |
The number of rows in the sparse matrix to be constructed |

`columns` |
The number of columns in the sparse matrix to be constructed. |

`density` |
The density of the sparse matrix to be constructed. A number less than one. |

The number of nonzero elements in the output is approximately

`density*rows*columns`

. The nonzero elements are normally distributed with mean `0`

and standard deviation `1`

.
>>sprandn(30,30,.015)( 5, 1) -1.1923 ( 12, 1) 1.4558 ( 28, 5) -0.0898 ( 18, 6) -1.4362 ( 23, 10) -0.0084 ( 23, 11) -1.1152 ( 9, 12) 0.1994 ( 15, 14) 1.4085 ( 28, 14) -0.1934 ( 19, 19) -0.9072 ( 18, 20) 0.6373 ( 2, 28) -1.4672 ( 29, 28) -1.2407 ( 23, 30) 1.9549