load - Load device objects, channels, or lines into MATLAB® workspace

Syntax

load file
load file obj1 obj2. . .
out = load('file','obj1','obj2',. . .)

Arguments

file

The MAT-file name.

obj1 obj2...

Device objects, an array of device objects, channels, or lines.

out

A structure containing the loaded device objects.

Description

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

load file obj1 obj2... returns the specified device objects from the MAT-file file into the MATLAB workspace.

out = load('file','obj1','obj2',...) returns the specified device objects from the MAT-file file as a structure to out instead of directly loading them into the workspace. The field names in out match the names of the loaded device objects. If no device objects are specified, then all variables existing in the MAT-file are loaded.

Remarks

Loading device objects follows these rules:

If you use the help command to display the M-file help for load, then you must supply the pathname shown below.

help daq/private/load

Examples

This example illustrates the behavior of load when the loaded device object has properties that differ from the workspace object.

ai = analoginput('winsound');
addchannel(ai,1:2);
save ai
ai.SampleRate = 10000;
load ai
Warning: Loaded object has updated property values.

See Also

Functions

daqread, propinfo, save

  


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