reverse-shooting

Matlab scripts for reverse shooting
Log | Files | Refs | README

shadenber.m (547B)


      1 function []=shadenber(blah);
      2 
      3 % shadenber.m
      4 %
      5 %  Routine to shade the nberdates in a figure
      6 
      7 load nberdates;  % start and finish contain the recession periods, back to 1857
      8 curax=axis;
      9 indx1=find(finish>curax(1));  % First recession to include;
     10 indx2=find(start<curax(2));  % Last recession to include;
     11 indx1=indx1(1);
     12 indx2=indx2(length(indx2));
     13 if start(indx1)<curax(1);
     14   start(indx1)=curax(1);
     15 end;
     16 if finish(indx2)>curax(2);
     17   finish(indx2)=curax(2);
     18 end;
     19 
     20 colorstr=[159 182 205]/256;
     21 
     22 shade(start(indx1:indx2),finish(indx1:indx2),colorstr);