Hi Peter,
Check out how to use Eventually (Poll for value to asynchronously satisfy constraint - MATLAB - MathWorks India)
This will allow you to set up a timeout condition
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!