Running timers in batch processes
4 views (last 30 days)
I have a few questions regarding the use of 'batch' function in the Parallel Computing Toolbox (Matlab 2015aSP1). Any help on these would be very much appreciated.
1. I understand that using batch invokes a new 'Headless' matlab process. Is there any way to re-name this new process (so for example it appears as 'DataIO.exe' as opposed to the standard 'Matlab.exe' in Windows Task manager).
2. My new batch-invoked process is required to read data from an external source with a sampling interval of x-seconds. I have tried to use a timer within this new process (to enable the process to do other calculations in between these sample readings) but it does not work. Is the use of dedicated Timers disabled within the batch-invoked process (much in the same way as updating GUI objects). If so, then is there any other way of interleaving other computations between each data read (without invoking a new process).
3. In order to reduce the loading on the processor, is there any way to make the batch-invoked process sleep between data sampling (perhaps something similar to Thread.sleep() in Java). I am currently using the function 'pause(x)' - is this the best way to reduce the processor load.
Many thanks for reading!
Mohamed Abdelkader Zahana on 3 Aug 2016
I am also interested to know the answer, as I am trying to do parallel processing to avoid delays caused by serial execution of complex tasks. I am using timers to do asynchronous execution, but I know that it is not parallel. Have you found any answer?