| Data Acquisition Toolbox | ![]() |
Return property characteristics for device objects, channels, or lines
Syntax
out = propinfo(obj)out = propinfo(obj,'PropertyName')
Arguments
obj |
A device object, channels, or lines. |
'PropertyName' |
A valid obj property name. |
out |
A structure whose field names are the property names for obj (if PropertyName is not specified). |
Description
returns the structure out = propinfo(obj)
out whose field names are the property names for obj. Each property name in out contains the fields shown below.
returns the structure out = propinfo(obj,'PropertyName')
out for the property specified by PropertyName. If PropertyName is a cell array of strings, a cell array of structures is returned for each property.
Example
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);
To capture all property information for all common ai properties
out = propinfo(ai);
To display the default value for the SampleRate property
out.SampleRate.DefaultValue
ans =
8000
To display all the property information for the InputRange property
propinfo(ai.Channel,'InputRange')
ans =
Type: 'double'
Constraint: 'Bounded'
ConstraintValue: [-1 1]
DefaultValue: [-1 1]
ReadOnly: 0
ReadOnlyRunning: 1
DeviceSpecific: 0
Functions
| peekdata | putdata | ![]() |