Suspend MATLAB execution until object stops logging
wait( suspends MATLAB® execution until the group object GObj)GObj has stopped logging.
GObj must be a scalar dagroup object.
Use the wait function when you want to guarantee that all data is
logged before another task is performed.
You can press Ctrl+C to interrupt the wait
function. An error message appears, and control returns to the MATLAB command window.
wait( waits at
most GObj,TSec)TSec seconds for GObj to stop logging. If the
group object is still logging when the timeout maximum value is exceeded, an error is
generated.