Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

isreplicated - True for replicated array

Syntax

tf = isreplicated(X)

Description

tf = isreplicated(X) returns true for a replicated array, or false otherwise. For a description of a replicated array, see Array Types. isreplicated also returns true for a Composite X if all its elements are identical.

Remarks

isreplicated(X) requires checking for equality of the array X across all labs. This might require extensive communication and time. isreplicated is most useful for debugging or error checking small arrays. A codistributed array is not replicated.

Examples

With an open MATLAB pool,

spmd
    A = magic(3);
    t = isreplicated(A) % returns t = true
    B = magic(labindex);
    f = isreplicated(B) % returns f = false
end

See Also

isa, iscodistributed, isdistributed

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS