Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
9490:3aeb7d881578 | 9491:ac5e381f7a1c |
---|---|
125 fflush (ostream); | 125 fflush (ostream); |
126 | 126 |
127 str = {}; | 127 str = {}; |
128 while (isempty (str)) | 128 while (isempty (str)) |
129 str = char (fread (istream)'); | 129 str = char (fread (istream)'); |
130 if (! isempty (str)) | 130 if (isempty (str)) |
131 sleep (0.05); | |
132 else | |
131 str = regexp (str, "OCTAVE:.*", "match"); | 133 str = regexp (str, "OCTAVE:.*", "match"); |
132 str = str{end}(8:end); | 134 str = str{end}(8:end); |
133 endif | 135 endif |
134 fclear (istream); | 136 fclear (istream); |
135 endwhile | 137 endwhile |