I'm not sure I follow this, but I think there is a problem in these lines:
gamma_opt and xit_opt will be modified by all of the different processors in parallel, and that looks to MATLAB like the different processor outputs will be overwriting each other. Try using other variables as outputs of the find command, e.g.
and change the next two lines accordingly.
Also, you should probably pre-allocate gamma_opt and xit_opt to hold length(mu) outputs.