t">% the first good data point (bg) and last good data point (ed) for</span>
0120         <span class="comment">% each segment</span>
0121         [I,~]   = ind2sub(size(A(zi).Comp.gps_reject_locations),find(A(zi).Comp.gps_reject_locations==1));
0122         df      = diff(I);
0123         nbrk    = sum(df&gt;1)+1;
0124         [I2,~]  = ind2sub(size(df),find(df&gt;1));
0125         bg(1)   = (I(1)-1);
0126         <span class="keyword">for</span> n = 2 : nbrk
0127             bg(n) = (I(I2(n-1)+1)-1);
0128