time | calls | line |
---|
| | 1 | function s = spalloc(m,n,nzmax)
|
| | 2 | %SPALLOC Allocate space for sparse matrix.
|
| | 3 | % S = SPALLOC(M,N,NZMAX) creates an M-by-N all zero sparse matrix
|
| | 4 | % with room to eventually hold NZMAX nonzeros.
|
| | 5 | %
|
| | 6 | % For example
|
| | 7 | % s = spalloc(n,n,3*n);
|
| | 8 | % for j = 1:n
|
| | 9 | % s(:,j) = (a sparse column vector with 3 nonzero entries);
|
| | 10 | % end
|
| | 11 | %
|
| | 12 | % See also SPONES, SPDIAGS, SPRANDN, SPRANDSYM, SPEYE, SPARSE.
|
| | 13 |
|
| | 14 | % Copyright 1984-2013 The MathWorks, Inc.
|
| | 15 |
|
| 2 | 16 | s = sparse([],[],[],m,n,nzmax);
|