How to enable two threads to tackle with different tasks? E.G. control hardware acquisition and data processing synchronously
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Raymond Norris
2022-2-16
parfeval can run different tasks. For example:
pool = parpool(2);
daq = pool.parfeval(@acquireData, ..);
proc = pool.parfeval(@processData, ..);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!