| Data Acquisition Toolbox | ![]() |
Return 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. |
obj.Channel(index) |
One or more channels contained by obj. |
obj.Line(index) |
One or more lines contained by obj. |
'PropertyName' |
A property name or a cell array of property names. |
Description
returns the structure out = get(obj)
out, where each field name is the name of a property of obj and each field contains the value of that property.
returns the structure out = get(obj.Channel(index))
out, where each field name is the name of a channel property of obj and each field contains the value of that property.
returns the structure out = get(obj.Line(index))
out, where each field name is the name of a line property of obj and each field contains the value of that property.
returns the value of the property specified by out = get(obj,'PropertyName')
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.
returns the value of out = get(obj.Channel(index),'PropertyName')
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.
returns the value of out = get(obj.Line(index),'PropertyName')
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.
Remarks
If you use the help command to display the M-file help for get, then you must supply the pathname shown below.
Example
Create the analog input object ai for a sound card and configure it to operate in stereo mode.
The commands shown below are some of the ways you can use get to return property values.
chan = get(ai,'Channel'); out = get(ai,{'SampleRate','TriggerDelayUnits'}); out = get(ai); get(chan(1),'Units') get(chan,{'Index','HwChannel','ChannelName'})
Functions
| flushdata | getdata | ![]() |