Data Acquisition Toolbox    
set

Configure or display device object properties

Syntax

Arguments

obj
A device object, array of device objects, channels, or lines.
'PropertyName'
A property name.
PropertyValue
A property value.
PN
A cell array of property names.
PV
A cell array of property values.
S
A structure whose field names are device object, channel, or line properties.
props
A structure array whose field names are the property names for obj, or a cell array of possible values.

Description

set(obj) displays all configurable properties for obj. If a property has a finite list of possible string values, then these values are also displayed.

props = set(obj) returns all configurable properties to props. props is a structure array with fields given by the property names, and possible property values contained in cell arrays. if the property does not have a finite set of possible values, then the cell array is empty.

set(obj,'PropertyName') displays the valid values for the property specified by PropertyName. PropertyName must have a finite set of possible values.

props = set(obj,'PropertyName') returns the valid values for PropertyName to props. props is a cell array of possible values or an empty cell array if the property does not have a finite set of possible values.

set(obj,'PropertyName',PropertyValue,...) sets multiple property values with a single statement. Note that you can use structures, property name/property value string pairs, and property name/property value cell array pairs in the same call to set.

set(obj,PN,PV) sets the properties specified in the cell array of strings PN to the corresponding values in the cell array PV. PN must be a vector. PV can be m-by-n where m is equal to the specified number of device objects, channels, or lines and n is equal to the length of PN.

set(obj,S) where S is a structure whose field names are device object properties, sets the properties named in each field name with the values contained in the structure.

Remarks

If you use the help command to display the M-file help for set, 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.

To display all of ai's configurable properties and their valid values:

To set the value for the SampleRate property to 10000:

The following two commands set the value for the SampleRate and InputType properties using one call to set.

You can also set different channel property values for multiple channels.

See Also

Functions

get, setverify


  save setverify