dateOut=monthStr2num(dateIn) Converts output structure of tstr2date.m to have nummeric (1:12) month field, rather than string field.
0001 function dateOut=monthStr2num(dateIn) 0002 0003 %dateOut=monthStr2num(dateIn) 0004 % 0005 %Converts output structure of tstr2date.m 0006 %to have nummeric (1:12) month field, rather 0007 %than string field. 0008 0009 month=getmonth; 0010 0011 for i=1:12 0012 if (strcmp(dateIn.month,month{i})) 0013 dateIn.month=i; 0014 end 0015 end 0016 0017 dateOut=dateIn;