diff --git a/tsgqc.m b/tsgqc.m
index f5cb86956937f6acde9b377573e192f093173f7c..48ea5073b5e9491b2ebbd05a9a15012eb6ab4b9b 100644
--- a/tsgqc.m
+++ b/tsgqc.m
@@ -3451,8 +3451,13 @@ hrbInterpCancel = uicontrol( ...
     k = kml(tsg.CYCLE_MESURE);
     
     % get indice from the selected area
-    ind = find(tsg.DAYD > hPlotAxes(1).XLim(1) & ...
+    if verLessThan('matlab','8.4')
+      XLim = get(hPlotAxes(1), 'XLim');
+      ind = find(tsg.DAYD > XLim(1) & tsg.DAYD < XLim(2));    
+    else
+      ind = find(tsg.DAYD > hPlotAxes(1).XLim(1) & ...
         tsg.DAYD < hPlotAxes(1).XLim(2) );
+    end
     
     % Color value format must be passed as a character array according
     % to the format string 'AABBGGRR', eg: red = 'FF0000FF'