User`s guide

isrunning
Purpose Determine w hether video input object is running
Syntax bool = isrunning(obj )
Description bool = isrunning(obj ) returns true if th e video input object obj is
running, otherwise
false. A video input object is running if the value o f
its
Running property is set to 'on'.
If
obj is an array of video input objects, bool is a logical array where
each elemen t in
bool represents the corresponding ele m ent in obj.Ifan
object in
obj is running, the is running function sets the corresponding
element in
bool to true,otherwisefalse. If any of the video input
objects in
obj is invalid, isrunning returns an e rror.
Examples Create a video input object, configure a manual trigger, and then start
the object. This puts the object in running state.
vid = videoinput('win video');
triggerconfig(vid,'manual')
start(vid)
Use isrunning to check the state of the object.
bool = isrunning(vid)
bool =
1
Create a second video input object.
vid2 = videoinput('wi nvideo');
Use isrunning to determine which of the two objects is running.
bool = isrunning([vid vid2])
bool =
10
See Also islogging, isvalid, sta rt, stop, videoinput
12-33