Access variables in parallel computing
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
I have a problem that I'm unsure how to solve:
I have a video camera recording during a task that gives a TTL signal per frame (approx 75 Hz) that I would like to count in the background while the main task is running. However to synchronize the signals I would like MATLAB to access the counter variable at certain points during the task and return the frame number. I have tried using the parallel computing toolbox, however I do not know how to access the counter variable in the background. Is there any way of doing this on one machine or how could this be best achieved?
Thanks in advance for the help,
John
3 Kommentare
Alice
am 18 Jun. 2024
Hi,
A bit late, but I have the same question : I need to access a variable in my main program that is being modified in the background. I can access it sometimes but it will stop updating the variable after some time and give me a constant value when the actual variable is changing, so I think that I'm not going about it the right way.
How did you solve your problem?
Thanks in advance,
Alice
Antworten (2)
Steven Lord
am 4 Apr. 2022
2 Kommentare
Steven Lord
am 4 Apr. 2022
Doesn't this paragraph from the documentation page address that?
"Use parfeval with the background pool to run a function in the background. parfeval immediately returns a Future object that represents the function running in the background. To get results from the Future, call fetchOutputs."
Siehe auch
Kategorien
Mehr zu Parallel Computing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!