| Data Acquisition Toolbox™ | ![]() |
UserData stores data that you want to associate with the device object.
Note that if you return analog input object information to the MATLAB workspace using the daqread function, the UserData value is not restored.
Usage | AI, AO, DIO, common to all channels and lines |
Access | Read/write |
Data type | Any type |
Read-only when running | No |
The default value is an empty vector.
Create the analog input object ai and add two channels to it.
ai = analoginput('nidaq','Dev1');
addchannel(ai,0:1);Suppose you want to access filter coefficients during the acquisition. You can create a structure to store these coefficients, which can then be stored in UserData.
coeff.a = 1.0; coeff.b = -1.25; set(ai,'UserData',coeff)
![]() | UnitsRange | Device-Specific Property by Vendor Reference | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |