Constructing class objects before the parfor loop
Mostrar comentarios más antiguos
Hi!
I am using OOP by constructing objects and running it multiple times within a while loop. In order to make the code faster, I pass my initial arguments to the class before the loop so it does not need to be initilized everytime.
I am tried switching the while loop to a parfor loop since I have multiple objects which I need to run independently every iteration. However, I am not able to initialize the objects before the parfor loop nor can I figure out how to call the objects after the loop since they are defined within the loop.
I am very new to oop so I might be wrong on many things and I would really appreciate the help.
Thanks!
Respuesta aceptada
Más respuestas (0)
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!