How to enable two threads to tackle with different tasks? E.G. control hardware acquisition and data processing synchronously
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Wang Yifan
le 16 Fév 2022
Réponse apportée : Raymond Norris
le 16 Fév 2022
i have learned about the paralell computing toolbox, and some functions like parfor or parfeval. However, in the demo, it seems that they both accelerate the processing only when the tasks are similar, i.e. codes in the for-loop.
How to make MATLAB working in two threads to tackle with different tasks.For expamle, one thread controls the hardware for data acquisition and the other one processes the data synchronously?
0 commentaires
Réponse acceptée
Raymond Norris
le 16 Fév 2022
parfeval can run different tasks. For example:
pool = parpool(2);
daq = pool.parfeval(@acquireData, ..);
proc = pool.parfeval(@processData, ..);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown 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!