Data Acquisition Toolbox | ![]() ![]() |
Saving Device Objects to a MAT-File
You can save a device object to a MAT-file just as you would any workspace variable -- using the save
command. For example, to save the analog input object ai
and the variable time
defined in the preceding section to the MAT-file myai1.mat
:
Read-only property values are not saved. Therefore, read-only properties use their default values when you load the device object into the MATLAB workspace. To determine if a property is read-only, use the propinfo
function or examine the property reference pages.
Loading the Device Object
To load a device object that was saved to a MAT-file into the MATLAB workspace, use the load
command. For example, to load ai
and time
from MAT-file myai1.mat
:
![]() | Saving and Loading Device Objects | Logging Information to Disk | ![]() |