Update struct field in parfor
Mostrar comentarios más antiguos
I'm wondering hwo to go around the issue below (this is a simplified version of my code)
method = struct('Len', 1);
parfor nf = 1:3
method.Len = nf^2;
res(nf) = mean(nf+randn(method.Len, 1));
end
The issue is that the struct field cannot be updated within parfor. Is there any workaround to update struct field in a parfor?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!