I am trying to read in images that contains varying parameters (series, time, channels, zslices) and have a few nested for loops to go through it all. When trying to parallelize it, sometimes it might be more efficient to stick the parfor on the parameter that has more values. Is there a way to decide which for loop to parfor if I have the variables nSeries, nTime, etc. in a way that doesn't involve rewriting the code with different possible functions?
Thanks.
Best Answer