User`s guide

obj2mfile
String Description
{'reuse'}
Find
and modify an existing objec t, if the existing object
is associated with the same adaptor and the values of
the
DeviceID, Video Format,andTag properties match
the object being created. If no matching object can be
found,
obj2mfile creates a new object.
'create'
Create a new object regardless of whether there are
reusable objects.
Note that obj2mfile(obj,filename,reuse) is a valid syntax. If the
syntax and mode arguments are not specified, obj2mfile uses their
default v alues.
Examples Create a video input o bject.
vidobj = videoinput( 'winvideo', 1, 'RGB24_6 40x480');
Configure several properties of the video input object.
set(vidobj, 'Frame sPer Trigger', 100);
set(vidobj, 'Frame Grab Interval', 2);
set(vidobj, 'Tag', 'CA M1');
Retrieve the selected video source object associated with the video
input object.
src = getselectedsour ce(vidobj);
Configure the properties o f the video source object.
set(src, 'Contrast ', 85);
set(src, 'Saturati on', 125);
Save the video input object.
obj2mfile(vidobj, 'myvidobj.m', 'set', 'modif ied');
Delete the object and clear it from the workspace.
12-39