From: Andria on
I haven already asked a question addressing this today, but through my researching this afternoon I have learned a little more to ask it better to maybe better enable a response.

Problem: I have code that has worked fine in a for loop, but returns errors in a parloop b/c it says that I have variables that cannot be classified.

My thoughts: I see that all variables must be classified. I have about 5 matrices in my parfor code that cannot be classified, giving me errors. These matrices should be classified as temporary variables. I think matlab is trying to classify them as sliced variables, and is finding an error because they are not indexed using the loop iteration, but rather other variables that are defined within the parfor loop. What I find confusing then is that these matrices are actually completely disconnected from the iterations, so it seems like there should not be a problem. Is there any way to "tell" matlab that these matrices are to be temporary variables? I am not sure how to change my code so that matlab can classify them appropriately.

Thank you!