How to enable two threads to tackle with different tasks? E.G. control hardware acquisition and data processing synchronously
조회 수: 2 (최근 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!