I am trying to convert my code to run in parallel, but I get an error when I use the parfor : "in a parfor loop, variable is indexed in different ways". I can not understand, how is this being indexed in different ways? The order that each iteration is completed does not matter, and each iteration is completely independent.
parfor g = 1:ng [A] = function(g) B(g, :, 1) = mean( A(:,:) ); B(g, :, 2) = std( A(:,:) );
thanks end
Best Answer