function date_axis take a plot that has MJD on the axis and turn it into a real date Make axis have dates
0001 function date_axis 0002 % function date_axis 0003 % 0004 % take a plot that has MJD on the axis and turn it into a real date 0005 % Make axis have dates 0006 lab=get(gca,'XTickLabel'); 0007 for i=1:size(lab,1) 0008 label(i)=eval(sprintf('10000*%s',lab(i,:))); 0009 end 0010 clear lab 0011 [y m d]=mjd2date(label); 0012 for i=1:length(label) 0013 lab{i}=sprintf('%d/%d',m(i),d(i)); 0014 end 0015 set(gca,'XTickLabel',lab); 0016