diff scripts/plot/__gnuplot_get_var__.m @ 9491:ac5e381f7a1c

__gnuplot_get_var__: if read fails to return data, sleep before trying again
author Olli Saarela <olli.saarela@gmail.com>
date Wed, 05 Aug 2009 16:35:10 -0400
parents 38ad8c99d6a2
children 95c3e38098bf
line wrap: on
line diff
--- a/scripts/plot/__gnuplot_get_var__.m
+++ b/scripts/plot/__gnuplot_get_var__.m
@@ -127,7 +127,9 @@
       str = {};
       while (isempty (str))
         str = char (fread (istream)');
-        if (! isempty (str))
+        if (isempty (str))
+	  sleep (0.05);
+	else
           str = regexp (str, "OCTAVE:.*", "match");
           str = str{end}(8:end);
         endif