Data Acquisition Toolbox    
size

Return the size of a device object, channel group, or line group

Syntax

Arguments

obj
A device object or array of device objects.
dim
The dimension.
obj.Channel
The channels contained by obj.
obj.Line
The lines contained by obj.
d
A two-element row vector containing the number of rows and columns in obj.
m1,m2,m3,...,mn
Each dimension of obj is captured in a separate variable.
m
The length of the dimension specified by dim.

Description

d = size(obj) returns the two-element row vector d = [m,n] containing the number of rows and columns in obj.

[m1,m2,m3,...,mn] = size(obj) returns the length of the first n dimensions of obj to separate output variables. For example, [m,n] = size(obj) returns the number of rows to m and the number of columns to n.

m = size(obj,dim) returns the length of the dimension specified by the scalar dim. For example, size(obj,1) returns the number of rows.

d = size(obj.Channel) returns the two-element row vector d = [m,n] containing the number of rows and columns in the channel group obj.Channel.

[m1,m2,m3,...,mn] = size(obj.Channel) returns the length of the first n dimensions of the channel group obj.Channel to separate output variables. For example, [m,n] = size(obj.Channel) returns the number of rows to m and the number of columns to n.

m = size(obj.Channel,dim) returns the length of the dimension specified by the scalar dim. For example, size(obj.Channel,1) returns the number of rows.

d = size(obj.Line) returns the two-element row vector d = [m,n] containing the number of rows and columns in the line group obj.Line.

[m1,m2,m3,...,mn] = size(obj.Line) returns the length of the first n dimensions of the line group obj.Line to separate output variables. For example, [m,n] = size(obj.Line) returns the number of rows to m and the number of columns to n.

m = size(obj.Line,dim) returns the length of the dimension specified by the scalar dim. For example, size(obj.Line,1) returns the number of rows.

Example

Create the analog input object ai for a National Instruments board and add eight channels to it.

To find the size of the device object:

To find the size of the channel group:

See Also

Functions

length


  showdaqevents softscope