ifts, [1, numsamples]);
0092 
0093 <span class="comment">% Which regions are invalid?</span>
0094 left_valid = max(find(any(resample_inds &lt; 1))) + 1;            <span class="keyword">if</span> (isempty(left_valid)), left_valid = 1;  <span class="keyword">end</span>;
0095 right_valid = min(find(any(resample_inds &gt; numsamples))) - 1;  <span class="keyword">if</span> (isempty(right_valid)), right_valid = numsamples; <span class="keyword">end</span>;
0096 <span class="keyword">if</span> (left_valid &gt;= 