| Parallel Computing Toolbox™ | ![]() |
T = true(n, dist)
T = true(m, n, dist)
T =
true([m, n], dist)
T = true(n, dist) creates an n-by-n codistributed array of underlying class logical. T is distributed by dimension dim, where dim = distributionDimension(dist), and with partition PAR, where PAR = distributionPartition(dist). If dim is unspecified, then T is distributed by its second dimension. If PAR is unspecified, then T 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 true.
T = true(m, n, dist) and T = true([m, n], dist) create an m-by-n codistributed array of underlying class logical. The distribution dimension dim and partition PAR can be specified by dist as above, but if they are not specified, dim is taken to be the last nonsingleton dimension of T, and PAR is provided by defaultPartition over the size in that dimension.
With four labs,
T = true(1000, codistributor())
creates a 1000-by-1000 codistributed double array T, distributed by its second dimension (columns). Each lab contains a 1000-by-250 local piece of T.
T = true(10, 10, codistributor('1d', 2, 1:numlabs))
creates a 10-by-10 codistributed logical array T, distributed by its columns. Each lab contains a 10-by-labindex local piece of T.
true MATLAB function reference page
cell, eye, false, Inf, NaN, ones, rand, randn, sparse, speye, sprand, sprandn, zeros
![]() | taskStartup | wait | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |