Constructing class objects before the parfor loop
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Parallel for-Loops (parfor) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!