coGammae=[];
Gammae_p1=diag(repmat((o_kappae'-u_kappae'),1,2));
tempv=arrayfun(@(i) cost(i)*genY(calG(i),mpc),1:length(calG),'UniformOutput',0);
Gammae_p1=Gammae_p1+sum(cat(3,tempv{:}),3);
clear tempv
tempv=arrayfun(@(k) (o_mue(k)-u_mue(k))*genZ(k,mpc),1:nl,'UniformOutput',0);
Gammae_p1=Gammae_p1+sum(cat(3,tempv{:}),3);
clear tempv
tempv=arrayfun(@(i) (o_lambdae(i)-u_lambdae(i))*genY(i,mpc)+(o_gammae(i)-u_gammae(i))*genbarY(i,mpc),1:nb,'UniformOutput',0);
Gammae_p1=Gammae_p1+sum(cat(3,tempv{:}),3);
clear tempv
for idx_m=1:length(calM)
tempv=arrayfun(@(k) (o_upsilon(k,idx_m)-u_upsilon(k,idx_m))*(genZ(k,mpc)+DF0(k,calM(idx_m))*genZ(calM(idx_m),mpc)-gencGDY(k,calM(idx_m),mpc)),1:nl,'UniformOutput',0);
Gammae_p1=Gammae_p1+sum(cat(3,tempv{:}),3);
clear tempv
end
coGammae=[Gammae_p1>=0];