Effacer les filtres
Effacer les filtres

Is there a way in Matlab M code to pause a process (exe) that has been launched by that M code?

2 vues (au cours des 30 derniers jours)
Is there a way in Matlab M code to pause a process (exe) that has been launched by that M code?
For instance:
eval_str = 'some process';
runtime = java.lang.Runtime.getRuntime();
process = runtime.exec(eval_str);
What I need to do is suspend (pause) 'some process' temporarily.
During this pause, we wish to call the Matlab "load('some file' that 'some process' is writing to)" then resume execution of 'some process'.
Our intent is to display progress of the completion of 'some process' before 'some process' has completed.
So, we currently call "load('some file')" while 'some process' is currently writing to it.
But the "load()" function crashes and brings down all of Matlab with it, regardless of:
1) It being within a "try/catch" block, and
2) Regardless of putting "pause('some time increment') both before and after the "load()" command.
Our theory is that if we can pause 'some process' to prevent writing to 'some file' while "load()" reads it, this will prevent the crash.
(If this cannot be done using Matlab M files, then we will investigate doing this with a mex via C++).
Thank you,
Andrew

Réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by