function zdummy_return
global zeng zeng2
for temp=1:length(zeng2.varlist)
   eval(['global ' zeng2.varlist{temp}])
end
%--------------
for p=1:length(zeng2.var)
    eval([zeng2.var{p}.name '.vm     =zeng2.dummyvm([zeng2.setup.nseg_length(p,1):zeng2.setup.nseg_length(p,2)],:);'])
    if ~isempty(zeng.Iexstim)
        eval([zeng2.var{p}.name '.ve     = zeng2.dummyve([zeng2.setup.nseg_length(p,1):zeng2.setup.nseg_length(p,2)],:);'])
        if zeng2.options.vestim==1 %'calculated')
            eval([zeng2.var{p}.name '.vestim = zeng2.setup.stimVe.vestim(zeng2.setup.nseg_length(p,1):zeng2.setup.nseg_length(p,2),:);'])
        end
   end
   if ~isempty(zeng2.dummyvar{p}.xyzi)
      eval([zeng2.var{p}.name '.xyz=zeng2.dummyvar{p}.xyz;'])%um
   end
   %---------------------------------------------------------------------------------------------------------------------------
   if ~isempty(zeng2.dummyvar{p}.model)
      var_num=find(zeng2.dummymodelindex(:,1)==p);  
      s=zeng2.dummymodelindex(var_num,2);
      for q=1:length(zeng2.dummyvar{p}.model.gate)
         eval([zeng2.var{p}.name  '.' zeng2.dummyvar{p}.model.gate{q} '=zeng2.dummygate{s}{q}([zeng2.dummymodelindex(var_num,3):zeng2.dummymodelindex(var_num,4)],:);'])
      end
   end
   %---------------------------------------------------------------------------------------------------------------------------
   %---------------------------------------------------------------------------------------------------------------------------
end
%keep only zeng2.dummymodel
zeng2.dummyvar=[];
zeng2.dummyvm=[];
zeng2.dummyve=[];
zeng2.dummygate=[];

