
0019 
0020 <span class="keyword">if</span> size(x,1)&lt;max(shifts); error(<span class="string">'shifts should be no larger than nrows'</span>); <span class="keyword">end</span>
0021 <span class="keyword">if</span> min(shifts)&lt;0; error(<span class="string">'shifts should be nonnegative'</span>); <span class="keyword">end</span>
0022 shifts=shifts(:)';
0023 nshifts=numel(shifts);
0024 
0025 <span class="comment">% array of shift indices</span>
0026 N=size(x,1)-max(shifts); 
0027 shiftarray=<a href="nt_ve