| Data Acquisition Toolbox | ![]() |
Load device objects, channels, or lines into the MATLAB workspace
Syntax
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
returns all variables from the MAT-file load file
file into the MATLAB workspace.
returns the specified device objects from the MAT-file load file obj1 obj2...
file into the MATLAB workspace.
returns the specified device objects from the MAT-file out = load('file','obj1','obj2',...)
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:
x = [ai1 ai1 ai2]
EventLog property is restored to an empty vector. Use the propinfo function to determine if a property is read only.
BufferingConfig property when the BufferingMode property is set to Auto, and the MaxSamplesQueued property might not be restored to the same value because both these property values are based on available memory.
Note
load is not used to read in acquired data that has been saved to a log file. You should use the daqread function for this purpose.
|
If you use the help command to display the M-file help for load, then you must supply the pathname shown below.
Example
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.
Functions
| length | makenames | ![]() |