| Data Acquisition Toolbox | Search  Help Desk |
| length | Examples See Also |
Return the length of a data acquisition device object, channel group, or line group.
Syntax
length(obj)
length(obj.Channel)
length(obj.Line)
Description
length(obj) returns the length of data acquisition device object obj. It is equivalent to maxsize(obj).
length(obj.Channel) returns the length of the channel group obj.Channel.
length(obj.Line) returns the length of the line group obj.Line.
Example
Suppose you create the analog input objectai for a National Instruments board and add 8 channels to it.
ai = analoginput('nidaq', 1);
ch = addchannel(ai, 0:7);
To find the length of the device object
length(ai)
ans =
1
To find the length of the channel group
length(ch)
ans =
1
See Also
Functions
size