Determine whether video input object is logging
bool = islogging(obj)
If obj is an array of video input objects, bool is a logical array where each element in bool represents the corresponding element in obj. If an object in obj is logging data, islogging sets the corresponding element in bool to true, otherwise false. If any of the video input objects in obj is invalid, islogging returns an error.
Create a video input object.
vid = videoinput('winvideo');
To put the video input object in a logging state, start acquiring data. The example acquires 50 frames to increase the amount of time that the object remains in logging state.
vid.FramesPerTrigger = 50 start(vid)
When the call to the start function returns, and the object is still acquiring data, use islogging to check the state of the object.
bool = islogging(vid) bool = 1
Create a second video input object.
vid2 = videoinput('winvideo');
Start one of the video input objects again, such as vid, and use islogging to determine which of the two objects is logging.
start(vid) bool = islogging([vid vid2]) bool = 1 0