I've read through some parfor information but I am struggling to understand some of the implementation.
At the moment I am using a for loop. For simplicity it looks something like this:
MyInt=*random number generator to produce an integer*
*do some stuff on the items in the table, which is conditional on MyVariable value*
if *condition is met in the table == something*
for all rows that meet the condition (counting down)
counter2=counter2+number of rows removed;
display counters' value
What I would like to do is use multiple cpu cores, each core working on its own Table using MyVariable. Instead of running the inner nested loop twice (in this case), for each MyVariable value, I would like to run two instances of the nested loop. Is this possible? It would be great if there could be two instances of each variable that would not interact (effectively sandbox each instance of the nested loop) but I get the impression that this is not possible so I am trying to understand how I modify my code so I could use parfor. Help would be very much appreciated.