Can we use 'parfor' in user defined function?
Afficher commentaires plus anciens
Hello, Can we use 'parfor' in used defined functions? I want to use parfor in user defined functions to improve the speed of my code but its not working. Is there any way we can use it?
3 commentaires
KSSV
le 6 Août 2017
What function you are trying to use parfor?
Mohsin Shah
le 6 Août 2017
Walter Roberson
le 6 Août 2017
That use of parfor is not permitted because the output would depend upon which iteration ran last. You need either assign to an indexed variable or you need to use a reduction variable (for example totaling the values of the individual iterations)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!