Skip to Main Content Skip to Search
Product 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 as S, but normally distributed random entries with mean 0 and variance 1.

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

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

If rc is a vector of length lr, where lr <= min(m,n), then R has rc as its first lr singular values, all others are zero. In this case, R is 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

See Also

sprand | sprandsym

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS