| Data Acquisition Toolbox | Search  Help Desk |
| get | Examples See Also |
Syntax
out = get(obj)
out = get(obj.Channel(index))
out = get(obj,'Property')
out = get(obj.Channel(index),'Property')
Description
out = get(obj) returns a structure to out where each field name is the name of a common or device-specific property of obj. Each field of out contains the value of that property.
out = get(obj.Channel(index)) returns a structure to out where each field name is the name of a channel property of obj. Each field of out contains the value of that property.
out = get(obj,'Property') returns the value of the specified property for obj. If Property 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.
out = get(obj.Channel(index),'Property') returns the value of the specified property for the specified channels contained by obj. If index is greater than 1, out will be an m-by-1 cell array of property values where m is equal to the length of obj.Channel(index).
Example
Suppose you create the analog input objectai for a sound card and configure it to operate in stereo mode.
The commands shown below are some of the ways get can be used to return property values.ai = analoginput('winsound')addchannel(ai, 1:2)
chan = get(ai,'Channel')
out = get(ai, {'SampleRate','TriggerDelayUnits'})
out = get(ai)
get(chan, 'Units')
get(chan(1), {'HwChannel';'ChannelName'})
See Also
set