How do I differentiate the functions in parfeval?
Afficher commentaires plus anciens
I am trying to run a multiple functions parallel using parfeval, but I do not know how to destinguish between the programs because I can only input one function in the parfeval function. Is there a way to have changes between the programs when they are running parallel?
I have tried several things so far but these have been unsuccessful. (i) Include an input vector and use a different item in the vector in each iteration of the program. (ii) Collect the ID of the worker within the program and use this to differentiate between them. If there is a way to get the ID as a number to then use in an if-elseif statement, then I will be able to distinguish between the iterations of the program, but I could not figure out how to do this.
The output of the functions which are run using parfeval do not matter to me. During the program images and texts are saved which I use instead.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Parallel Computing Fundamentals 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!