pan> k=1:2*L
0082     <span class="keyword">if</span> k==1
0083         Fdyn = [Fdyn, X(:,1)==Xdone(:,1)];
0084     <span class="keyword">else</span>
0085         <span class="comment">% done values (history)</span>
0086         <span class="comment">% if k is past (done(k)==1), use values in Tdone, otherwise use linear update</span>
0087         Fdyn = [Fdyn, Xdone(:,k) - (1-done(k-1))*M &lt;=  X(:,k) &lt;= Xdone(:, k)+ (1-done(k-1))*M];
0088         
0089         <span class="comment">% not done values</s