0001 function period_reduce(date_start,date_end,output_stub,path_to_redscript,sched_to_reduce,runhealth)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 if(~exist('path_to_redscript','var'))
0014 path_to_redscript='reduc/redScript.red';
0015 end
0016 if(~exist('runhealth','var'))
0017 runhealth=1;
0018 end
0019
0020 start_date_num = datenum(date_start);
0021 end_date_num = datenum(date_end);
0022
0023 for i=0:(end_date_num - start_date_num)
0024
0025 d_string = datestr(start_date_num + i);
0026
0027
0028
0029
0030 if (exist('sched_to_reduce','var'))
0031 disp(['period_reduce:: Will reduce ',d_string, ' ',output_stub,' ',path_to_redscript,' ',sched_to_reduce]);
0032 day_reduce(d_string,output_stub,path_to_redscript,sched_to_reduce,runhealth);
0033 else
0034 disp(['period_reduce:: Will reduce ',d_string, ' ',output_stub,' ',path_to_redscript]);
0035 day_reduce(d_string,output_stub,path_to_redscript);
0036 end;
0037
0038
0039
0040
0041
0042 end;