Suppose I have the following example
clear; clc;
N = 10000;
parfor i = 1:N
inv(pi * eye(100) + randi(10,100));
end
I would like to track the loop's progress. For a sequential loop, I can just print out i
(or i/N
) but what can I do here please? I tried pre-declaring sum = 0;
and then inside the loop, I did
sum = sum + 1;
but I got an error when trying to display sum / N
.