Lu600save=X.Lu;
Ed600save=X.Ed;
Es620save=X.Es;

for b600=1:length(bad600end)
   ind=find(X.t>=bad600start(b600)&X.t<=bad600end(b600));
   X.Lu(ind,:)=NaN;
   X.Ed(ind,:)=NaN;
   if exist('Y','var')
   Y.K(ind,:)=NaN;
   Y.Kf(ind,:)=NaN;
   Y.Lw(ind,:)=NaN;
   Y.Lwf(ind,:)=NaN;
   Y.Lwn(ind,:)=NaN;
   Y.Lwnf(ind,:)=NaN;
   Y.Morel(ind,:)=NaN;
   Y.Morelf(ind,:)=NaN;
   end;

end;

for b620=1:length(bad620end)
   ind=find(X.t>=bad620start(b620)&X.t<=bad620end(b620));
   X.Es(ind,:)=NaN;
   X.Par(ind,:)=NaN;
   X.Par(ind,:)=NaN;
   if exist('Y','var')
   Y.K(ind,:)=NaN;
   Y.Kf(ind,:)=NaN;
   Y.Lw(ind,:)=NaN;
   Y.Lwf(ind,:)=NaN;
   Y.Lwn(ind,:)=NaN;
   Y.Lwnf(ind,:)=NaN;
   Y.Morel(ind,:)=NaN;
   Y.Morelf(ind,:)=NaN;
   end;
   
end;


