Documentation

sprandn

Sparse normally distributed random matrix

Syntax

R = sprandn(S)
R = sprandn(m,n,density)
R = sprandn(m,n,density,rc)

Description

R = sprandn(S)has the same sparsity structure asS, but normally distributed random entries with mean0and variance1.

R = sprandn(m,n,density)is a random,m-by-n, sparse matrix with approximatelydensity*m*nnormally distributed nonzero entries (0 <= density <= 1).

R = sprandn(m,n,density,rc)also has reciprocal condition number approximately equal torc.Ris constructed from a sum of matrices of rank one.

Ifrcis a vector of lengthlr, wherelr <= min(m,n), thenRhasrcas its firstlrsingular values, all others are zero. In this case,Ris generated by random plane rotations applied to a diagonal matrix with the given singular values. It has a great deal of topological and algebraic structure.

Tips

  • sprandnuses the same random number generator asrand,randi, andrandn. You control this generator withrng.

Extended Capabilities

See Also

|

Introduced before R2006a