s="comment">% k: knot vector</span>
0010 <span class="comment">% Nout: overwritten array N</span>
0011 
0012 Nout = N;
0013 p = size(N,1)-1;
0014 
0015 <span class="comment">% get supporting knots 'subKnot'</span>
0016 subKnot = zeros(1,2*p+1);
0017 <span class="keyword">for</span> s=1:(2*p+1)    
0018     subKnot(s) = k(knotSpan-p+s-1);
0019 <span class="keyword">end</span>
0020 
0021 s = 2;
0022     
0023 <span class="keyword">for</span> t=1:p
0024     
0025     <span class="keyword">if</span>((subKnot(t+