function G=gradBaCo(q,me)
  nme=size(me,2);
  dim=size(q,1);
  d=size(me,1)-1;
  G=zeros(nme,d+1,dim);
  for k=1:nme
    G(k,:,:)=simplex.gradBaCo(q(:,me(:,k)));
  end
end
