Data Acquisition Toolbox | ![]() ![]() |
Return the length of a device object, channel group, or line group
Syntax
Arguments
obj |
A device object or array of device objects. |
obj.Channel |
The channels contained by obj . |
obj.Line |
The lines contained by obj . |
out |
A double. |
Description
returns the length of the device object out = length(obj)
obj
to out
.
returns the length of the channel group contained by out = length(obj.Channel)
obj
.
returns the length of the line group contained by out = length(obj.Line)
obj
.
Example
Create the analog input object ai
for a National Instruments board and add eight channels to it.
Create the analog output object ao
for a National Instruments board, add one channel to it, and create the device object array aiao
.
ao = analogoutput('nidaq',1); aoch = addchannel(ao,0); aiao = [ai ao] Index: Subsystem: Name: 1 Analog Input nidaq1-AI 2 Analog Output nidaq1-AO
To find the length of the analog input channel group:
Functions
![]() | isvalid | load | ![]() |