- create a "communicating job" using https://www.mathworks.com/help/distcomp/createcommunicatingjob.html or parfeval(), and use parallel.pool.DataQueue() or parallel.pool.PollableDataQueue() to send messages back to the client
- use parfor with one worker, together with one of the two data queues
- use parfeval() or batch() or create a communicating job, together with using memmapfile() or a shared memory segment ("shared matrix" contribution in from File Exchange) to communicate between the two sides
how to run two .m files simultaneously?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i have written two scripts. one to track mouse pointer using kinect V1 and second is the GUI file. now i want to integrate the two files. i don't know how to integrate them.... thanks in advance... :)
0 commentaires
Réponses (1)
Walter Roberson
le 30 Avr 2018
GUI must run on the main MATLAB thread, never in a worker. Because of that you must use one of the following techniques:
However, do not try to use plain parfor without a parallel queue, or spmd for this purpose: they will take control and you will not be able to manage the GUI until they completed
It is possible that I missed an option or three.
.... But generally speaking, when you are communicating with an external device like that, unless the device is high bandwidth or requires low latency, then typically the better approach is to program access through callbacks, without using any parallel processing.
0 commentaires
Voir également
Catégories
En savoir plus sur Parallel Computing Fundamentals 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!