User`s guide

codistributed.spalloc
11-33
SD = codistributed.spalloc(N, N, 2*N);
for ii=1:N-1
SD(ii,ii:ii+1) = [ii ii];
end
end
See Also
spalloc | sparse | distributed.spalloc