show variables in parfor
Mostrar comentarios más antiguos
Hi everyone,
I practice parfor code in help(matlab). i run code but dont know how to show variable in parfor.
parfor i = 1:4
temp = struct();
temp.myfield1 = rand();
temp.myfield2 = i;
end
parfor i = 1:4
temp = struct('myfield1',rand(),'myfield2',i);
end
Thank for helping me.
Respuesta aceptada
Más respuestas (1)
Tiki Tiki
el 18 de Jul. de 2018
0 votos
2 comentarios
Walter Roberson
el 18 de Jul. de 2018
If you want to capture the console output of parfor(), then use diary(), or call the parfor() within evalc()
Tiki Tiki
el 18 de Jul. de 2018
Categorías
Más información sobre Parallel for-Loops (parfor) 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!