nd = indices(t==datetime(1989,10,1));
0157     <span class="comment">% in case time series starts after 1 Oct 1989</span>
0158     <span class="keyword">if</span> isempty(start_ind); start_ind = 1; <span class="keyword">end</span>
0159     end_ind = indices(t==datetime(2009,9,30));
0160     t = t(start_ind:end_ind);
0161     Q = Q(start_ind:end_ind);
0162     P = P(start_ind:end_ind);
0163     PET = PET(start_ind:end_ind);    
0164 
0165     [BaseflowRecessionK(i),BaseflowRecessionK_error_flag(i),BaseflowRe