show variables in parfor
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Tiki Tiki
am 18 Jul. 2018
0 Stimmen
2 Kommentare
Walter Roberson
am 18 Jul. 2018
If you want to capture the console output of parfor(), then use diary(), or call the parfor() within evalc()
Tiki Tiki
am 18 Jul. 2018
Kategorien
Mehr zu Parallel for-Loops (parfor) finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!