Main Content


Load OPC objects from MAT-file


load FileName
load FileName Obj1 Obj2 ...
S = load('FileName','Obj1','Obj2',...)


load FileName returns all variables from the MAT-file FileName into the MATLAB® workspace.

load FileName Obj1 Obj2 ... returns the specified OPC objects, Obj1, Obj2, ... from the MAT-file FileName into the MATLAB workspace.

S = load('FileName','Obj1','Obj2',...) returns the structure S with the specified toolbox objects Obj1, Obj2, ... from the MAT-file FileName, instead of directly loading the toolbox objects into the workspace. The field names in S match the names of the retrieved toolbox objects. If you specify no objects, load returns all variables from the MAT-file.

When you load an object, its read-only properties initially take their default values. For example, the Status property value of an opcda object is 'disconnected'. Use propinfo to determine if a property is read-only.


Assume the example on the save reference page saved the group object grp in the file mygroup. Load the group object from mygroup, and create a reference to the parent client.

load mygroup
da = grp.Parent;

Version History

Introduced before R2006a

See Also