I want to parallelize block2 for each block1 and parallerlize outer loop too.
previous code:
for i=rangei
You can't use nested parfor, From your question it seems that you are working on a matrix( with parameter i,j), try using blockproc, go through this link once blockproc