How to disable error box when using system to run compiled application?

2 vues (au cours des 30 derniers jours)
Rachel Soreq
Rachel Soreq le 6 Nov 2016
Réponse apportée : Jan le 6 Nov 2016
I've generated a MATLAB application using R2016b, and I'm running it (the compiled version) using system() in order to test it in various scenarios, many of which result in error by design. Whenever such an error occurs, an error dialog box opens and I have to click 'ok' in order for it to close and the execution to terminate. This gets in the way of automating the testing procedure for multiple tests, as it requires me to wait and click ok in each execution. Is there a way to prevent system() from displaying that box when an error occurs? or at least not wait for it to close in order to continue?

Réponse acceptée

Jan
Jan le 6 Nov 2016
The error is not caused by system, but by your application. Therefore you should catch errors there, e.g. by the catch command. If an automatic error handling is wanted, you have to definie this manually e.g. as input argument and consider it in the code.

Plus de réponses (0)

Catégories

En savoir plus sur Excel Add-Ins dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by