How to execute and run 2 different of codes simultaneously?
Show older comments
Hi, I have two different codes to collect 2 different of data from 2 different devices? How to run the two codes simultaneously?
Answers (1)
Ameer Hamza
on 2 May 2018
Edited: Ameer Hamza
on 2 May 2018
0 votes
You will need Parallel Computing Toolbox. Or if the device creates a MATLAB event on receiving a data, you can modify your code to add a listener to the event. That way, you listener callback function will be executed whenever data is received from a device. The listener callback will not block execution when no data is being received, and you can do some other task.
Categories
Find more on Whos 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!