concatenate inside parfor loop

23 vues (au cours des 30 derniers jours)
Lalo Landa
Lalo Landa le 7 Jan 2019
In my code, I use parfor to call a function, and then concatenate the result to the others in a matrix:
parfor i=1:num+1
result=function1(i);
X=[X,result];
end
The thing is that X is ordered, just like i need. Parfor always works like that and concatenates in order? or is pure luck?

Réponses (1)

Steven Lord
Steven Lord le 7 Jan 2019
See this documentation page for the answer to your question.

Catégories

En savoir plus sur Parallel for-Loops (parfor) dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by