distributed.spalloc - Allocate space for sparse distributed matrix
Syntax
SD = distributed.spalloc(M, N, nzmax)
Description
SD = distributed.spalloc(M, N, nzmax) creates
an M-by-N all-zero sparse distributed
matrix with room to hold nzmax nonzeros.
Examples
Allocate space for a 1000-by-1000 sparse distributed matrix
with room for up to 2000 nonzero elements, then define several elements:
N = 1000;
SD = distributed.spalloc(N, N, 2*N);
for ii=1:N-1
SD(ii,ii:ii+1) = [ii ii];
endSee Also
spalloc MATLAB function
reference page
codistributed.spalloc, sparse
 | distributed.randn | | distributed.speye |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit