Break a PAUSE inside a PARFOR loop

5 views (last 30 days)
Nex
Nex on 11 Mar 2020
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.

Answers (0)

Categories

Find more on MATLAB Compiler SDK in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!