SPALLOC

 

 Alloc memory for nonzero entries.

  s = SPALLOC(m,n,nzmax) creates an m-by-n all zero sparse matrix

  with room to eventually hold nzmax nonzeros.

  For example:

 

 

      s = spalloc(n,n,3*n);

      for j = 1:n

          s(:,j) = (a sparse column vector with 3 nonzero entries);

      end

 

 

  See also SPONES2V0KRD5, SPDIAGS1N6RNJL, SPRANDNHNISLD, SPRANDSYMKMF2Q4, SPEYE14EP1IN, SPARSE1V5MDWP.