f1=PSummesplit>=1e1;
b1=1e1*ones(size(myDatetime(f1));
f2=PSummesplit>=1e2;
b2=1e2*ones(size(myDatetime(f2));
ph=funcfill(x(f),y(f),b2,[0 0.25 0.25] ,'none');
hold on;
ph=funcfill(x(f2),y(f2),b3,[0 0.25 0.5],'none');
function fillhandle=funcfill(xpoints,upper,lower,color,edge)
filled=[upper,fliplr(lower)];
xpoints=[xpoints,fliplr(xpoints)];
fillhandle=fill(xpoints,filled,color);
set(fillhandle,'EdgeColor',edge,'FaceColor',color);
end
Best Answer