get

Device object properties

Syntax

out = get(obj)
out = get(obj,Channel(index))
out = get(obj,Line(index))
out = get(obj,'PropertyName')
out = get(obj,Channel(index),'PropertyName')
out = get(obj,Line(index),'PropertyName')
get(...)

Arguments

obj

A device object or array of device objects.

Channel(obj,index)

One or more channels contained by obj.

Line(obj,index)

One or more lines contained by obj.

'PropertyName'

A property name or a cell array of property names.

Description

out = get(obj) returns the structure out, where each field name is the name of a property of obj and each field contains the value of that property.

out = get(obj,Channel(index)) returns the structure out, where each field name is the name of a channel property of obj and each field contains the value of that property.

out = get(obj,Line(index)) returns the structure out, where each field name is the name of a line property of obj and each field contains the value of that property.

out = get(obj,'PropertyName') returns the value of the property specified by PropertyName to out. If PropertyName is replaced by a 1-by-n or n-by-1 cell array of strings containing property names, then get returns a 1-by-n cell array of values to out. If obj is an array of data acquisition objects, then out will be an m-by-n cell array of property values where m is equal to the length of obj and n is equal to the number of properties specified.

out = get(obj,Channel(index),'PropertyName') returns the value of PropertyName to out for the specified channels contained by obj. If multiple channels and multiple property names are specified, then out is an m-by-n cell array where m is the number of channels and n is the number of properties.

out = get(obj,Line(index),'PropertyName') returns the value of PropertyName to out for the specified lines contained by obj. If multiple lines and multiple property names are specified, then out is an m-by-n cell array where m is the number of lines and n is the number of properties.

get(...) displays all property names and their current values for the specified device object, channel, or line. Base properties are displayed first followed by device-specific properties.

Examples

Create the analog input object ai for a sound card and configure it to operate in stereo mode.

ai = analoginput('winsound');
addchannel(ai,1:2);

More About

expand all

Tips

If you use the help command to display the file help for get, then you must supply the pathname shown below.

help daq/daqdevice/get

See Also

|

Was this topic helpful?