| Parallel Computing Toolbox™ | ![]() |
D = speye(n, dist)
D = speye(m, n, dist)
D =
speye([m, n], dist)
D = speye(n, dist) creates an n-by-n sparse codistributed array of underlying class double. D is distributed by dimension dim, where dim = distributionDimension(dist), and with partition PAR, where par=distributionPartition(dist). If dim is unspecified, then D is distributed by its second dimension. If PAR is unspecified, then D uses defaultPartition(n) as its partition. The easiest way to do this is to use a default codistributor where both dim and PAR are unspecified (dist=codistributor()) as input to speye.
D = speye(m, n, dist) and D = speye([m, n], dist) create an m-by-n sparse codistributed array of underlying class double. The distribution dimension dim and partition PAR may be specified by dist as above, but if they are not specified, dim is taken to be the last nonsingleton dimension of D and PAR is provided by defaultPartition over the size in that dimension.
Note To create a sparse codistributed array of underlying class logical, first create an array of underlying class double and then cast it using the logical function: logical(speye(m, n, dist)) |
With four labs,
D = speye(1000, codistributor())
creates a 1000-by-1000 sparse codistributed double array D, distributed by its second dimension (columns). Each lab contains a 1000-by-250 local piece of D.
D = speye(10, 10, codistributor('1d', 2, 1:numlabs))creates a 10-by-10 sparse codistributed double array D, distributed by its columns. Each lab contains a 10-by-labindex local piece of D.
speye MATLAB function reference page
cell, eye, false, Inf, NaN, ones, rand, randn, sparse, sprand, sprandn, true, zeros
![]() | sparse | spmd | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |