% setdates [tmp0,tmp]=setdates(y0,q0,yend,qend);
% where tmp0 is the ticks to be used as x in an xy plot
function [tmp0,tmp]=setdates(y0,q0,yend,qend);

if q0==1;
qrt0='Jan';
elseif q0==2;
    qrt0='Apr';
elseif q0==3;
    qrt0='Jul';
elseif q0==4;
    
   qrt0='Dec';
end

if qend==1;
qrte='Jan';
elseif qend==2;
    qrte='Apr';
elseif qend==3;
    qrte='Jul';
elseif qend==4;
    
   qrte='Dec';
end
mnts={'1-Jan','1-Apr','1-Jul','1-Oct'};
tmp=[];
uu=q0;
zz=1;
lengthsm=length(y0+(q0-1)/4:.25:yend+(qend-1)/4);
for jj=y0:yend;
    while uu<=4&& zz<=lengthsm;

        tmp{end+1,1}=[mnts{uu},'-',num2str(jj)];
        uu=uu+1;
        zz=zz+1;
    end
    uu=1;
end
tmp0=datenum(tmp);
tmp=datestr(tmp0,'yyyy-QQ');
