Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

sprand - Sparse uniformly distributed random matrix

Syntax

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

Description

R = sprand(S) has the same sparsity structure as S, but uniformly distributed random entries.

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

R = sprand(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.

sprand uses the internal state information set with the rand function.

See Also

sprandn, sprandsym

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS