Filter löschen
Filter löschen

How to enable two threads to tackle with different tasks? E.G. control hardware acquisition and data processing synchronously

2 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

Raymond Norris
Raymond Norris am 16 Feb. 2022
parfeval can run different tasks. For example:
pool = parpool(2);
daq = pool.parfeval(@acquireData, ..);
proc = pool.parfeval(@processData, ..);

Weitere Antworten (0)

Kategorien

Mehr zu Data Acquisition Toolbox Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by