Variable to track parfor loop progress
17 views (last 30 days)
Show older comments
Andreu Angles Castillo on 18 Dec 2018
Answered: Edric Ellis on 19 Dec 2018
I am using a paralled program and i would like to keep track of the progress of the loop, each iteration takes more or less the same time to execute. I came up with the following solution.
I know I cannot use a variable in this way, but I believe the variable "i" could be used without any trouble in this way. Any work around?
Edric Ellis on 19 Dec 2018
@Matt J posted the simplest option which is to have the parfor loop display data. If you need more sophistication, you can use DataQueue to perform arbitrary computations at the client as the loop progresses, such as displaying a waitbar.
Matt J on 18 Dec 2018
What I do is display the loop counter, like in the following
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!