         <span class="keyword">end</span>
0129         <span class="keyword">for</span> n = 1 : nbrk -1
0130             ed(n) = (I(I2(n))+1);
0131         <span class="keyword">end</span>
0132         ed(nbrk)  = I(end)+1;
0133 
0134         <span class="comment">% Now, determine position based on bottom track starting from the</span>
0135         <span class="comment">% beginning and end of bad sections then average them together</span>
0136         
0137         <span class="comment">% Create a canvas th