lag = 1;
0086     error_str = [<span class="string">'Warning: eps set to a value larger than 1 percent of median(Q). High eps values can lead to problematic recession selection. '</span>, error_str];
0087 <span class="keyword">end</span>
0088 
0089 iszero = (Q==0);
0090 Q(iszero) = NaN; <span class="comment">% do not use days with zero flow</span>
0091 
0092 <span class="comment">% identify all individual recession segments with length &gt; recession_length days</span>
0093 <span class="comment">% how many 