home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SPARFUN.DI$ / SPALLOC.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  491 b   |  17 lines

  1. function s = spalloc(m,n,nzmax)
  2. %SPALLOC Alloc memory for nonzero entries.
  3. %    s = SPALLOC(m,n,nzmax) creates an m-by-n all zero sparse matrix
  4. %    with room to eventually hold nzmax nonzeros.
  5. %    For example:
  6. %
  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 (c) 1984-93 by The MathWorks, Inc.
  15.  
  16. s = sparse([],[],[],m,n,nzmax);
  17.