Load distributed arrays and Composite objects from disk
dload filename X
dload filename X Y Z ...
dload -scatter ...
[X,Y,Z,...] = dload('filename','X','Y','Z',...)
dload without any arguments retrieves all variables from the binary file named matlab.mat. If matlab.mat is not available, the command generates an error.
dload filename retrieves all variables from a file given a full pathname or a relative partial pathname. If filename has no extension, dload looks for filename.mat. dload loads the contents of distributed arrays and Composite objects onto parallel pool workers, other data types are loaded directly into the workspace of the MATLAB® client.
dload filename X loads only variable X from the file. dload filename X Y Z ... loads only the specified variables. dload does not support wildcards, nor the -regexp option. If any requested variable is not present in the file, a warning is issued.
dload -scatter ... distributes nondistributed data if possible. If the data cannot be distributed, a warning is issued.
[X,Y,Z,...] = dload('filename','X','Y','Z',...) returns the specified variables as separate output arguments (rather than a structure, which the load function returns). If any requested variable is not present in the file, an error occurs.
When loading distributed arrays, the data is distributed over the available parallel pool workers using the default distribution scheme. It is not necessary to have the same size pool open when loading as when saving using dsave.
When loading Composite objects, the data is sent to the available parallel pool workers. If the Composite is too large to fit on the current parallel pool, the data is not loaded. If the Composite is smaller than the current parallel pool, a warning is issued.
Load variables X, Y, and Z from the file fname.mat:
dload fname X Y Z
Use the function form of dload to load distributed arrays P and Q from file fname.mat:
[P,Q] = dload('fname.mat','P','Q');