how to run two .m files simultaneously?

8 views (last 30 days)
Shifa chang
Shifa chang on 30 Apr 2018
Answered: Walter Roberson on 30 Apr 2018
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... :)

Answers (1)

Walter Roberson
Walter Roberson on 30 Apr 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.

Categories

Find more on Parallel for-Loops (parfor) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!