| Scilab Reference Manual | 
|---|
sprand — sparse random matrix
sp=sprand(nrows,ncols,fill [,typ])
| nrows | : integer (number of rows) | 
| ncols | : integer (number of columns) | 
| fill | : filling coefficient (density) | 
| typ | : character string ('uniform' (default) or 'normal') | 
| sp | : sparse matrix | 
sp=sprand(nrows,ncols,fill) returns a sparse matrix sp with nrows rows, ncols columns and approximately fill*nrows*ncols non-zero entries.
If typ='uniform' uniformly distributed values on [0,1] are generated. If typ='normal' normally distributed values are generated (mean=0 and standard deviation=1).
W=sprand(100,1000,0.001);
| << spones | spzeros >> |