set
Configure or display image acquisition object properties
Syntax
set(obj)
prop_struct = set(obj)
set(obj,PropertyName
)
prop_cell = set(obj,PropertyName
)
set(obj,PropertyName
,PropertyValue,...)
set(obj,S)
set(obj,PN,PV)
Description
set(obj)
displays property names and any
enumerated values for all configurable properties of image acquisition object
obj
. obj
must be a single image acquisition
object.
prop_struct = set(obj)
returns the property
names and any enumerated values for all configurable properties of image acquisition object
obj
. obj
must be a single image acquisition object.
The return value prop_struct
is a structure whose field names are the
property names of obj
, and whose values are cell arrays of possible
property values or empty cell arrays if the property does not have a finite set of possible
character vector values.
set(obj,
displays the possible values for the specified property,
PropertyName
)PropertyName
, of image acquisition object
obj
. obj
must be a single image acquisition object.
Use the set(obj)
syntax to get a list of all the properties for a
particular image acquisition object that can be set.
prop_cell = set(obj,
returns the possible values for the specified property,
PropertyName
)PropertyName
, of image acquisition object
obj
. obj
must be a single image acquisition object.
The returned array prop_cell
is a cell array of possible values or an
empty cell array if the property does not have a finite set of possible character vector
values.
set(obj,
configures the property specified by the character vector
PropertyName
,PropertyValue,...)PropertyName
to the value specified by
PropertyValue
for image acquisition object obj
. You
can specify multiple property name/property value pairs in a single statement.
obj
can be a single image acquisition object or a vector of image
acquisition objects, in which case set
configures the property values for
all the image acquisition objects specified.
set(obj,S)
configures the properties of
obj
with the values specified in S
, where
S
is a structure whose field names are object property names.
set(obj,PN,PV)
configures the properties
specified in the cell array of character vectors, PN
, to the
corresponding values in the cell array PV
, for the image acquisition
object obj
. PN
must be a vector. If
obj
is an array of image acquisition objects, PV
can
be an M-by-N cell array, where M is equal to the length of the image acquisition object
array and N is equal to the length of PN
. In this case, each image
acquisition object is updated with a different set of values for the list of property names
contained in PN
.
Note
Parameter/value character vector pairs, structures, and parameter/value cell array
pairs can be used in the same call to set
.
Examples
These examples illustrate the various ways to use the set
function to
set the values of image acquisition object properties.
set(obj, 'FramesPerTrigger', 15, 'LoggingMode', 'disk'); set(obj, {'TimerFcn', 'TimerPeriod'}, {@imaqcallback, 25}); set(obj, 'Name', 'MyObject'); set(obj, 'SelectedSourceName')
Instead of using set
to set individual property values, you should
use dot notation. So for example, instead of this:
set(vid, 'FramesPerTrigger', 100);
You should use this syntax:
vid.FramesPerTrigger = 100;
Version History
Introduced before R2006a
See Also
get
| imaqfind
| videoinput