Suppress external error message when using dos command
Afficher commentaires plus anciens
Hello all,
I made an m-file which runs a lot of external executables through the dos command within a for loop as follows: [~,~]=dos(code);
Mostly this works perfectly. However, sometimes the external executable crashes and gives a Windows error as shown below. I don't really care about this error, I just want to close it and continue processing the m-file. Currently I have to manually close the error and then the m-file automatically continues, but I want to have the m-file run independently for multiple hours, so manual input is undesired. Is there anybody who can assist me with this question?
Thanks in advance for any help.

3 commentaires
Riccardo Albertin
le 16 Avr 2021
Hello Jordy,
did you solve this problem eventually?
In case, how?
Thank you in advance.
Walter Roberson
le 16 Avr 2021
I wonder if you would be able to improve on the situation by using .NET System.Diagnostics.Process instead of calling dos() ? https://www.mathworks.com/matlabcentral/answers/575608-system-and-system-diagnostics-process#answer_485447
Réponses (0)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!