Break a PAUSE inside a PARFOR loop

2 次查看(过去 30 天)
Nex
Nex 2020-3-11
I have a parfor loop that executes two functions. One is an indefinite pause, the other is an infinite loop:
parfor i = 1:2
if i == 1
%Start hardware A data acquisition
pause()
%Close hardware A data acqusition
else
while true %task continues until manually stopped
%USER INPUT BREAK HERE (how?)
%Hardware B data acqusition
end
end
end
I want a break function within the second parfor to also break the pause in the first parfor. Is that possible?
Also, how can messages be displayed from within the parfor loop? GUI butons, DISP and FPRINTF don't seem to work.
Obs: "Hardware A" (Tobii Eye Tracker) SDK only collects data during a "pause", so the pause and the parfor are necessary.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler SDK 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by