Mercurial > hg > octave-lyh
comparison scripts/plot/__gnuplot_version__.m @ 8163:7d6e659acc1a
__gnuplot_version__.m: include patchlevel in output
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 29 Sep 2008 18:47:24 -0400 |
parents | 9c15f385811c |
children | f16aafdd99ca |
comparison
equal
deleted
inserted
replaced
8162:293c4b5fe33d | 8163:7d6e659acc1a |
---|---|
36 error ("you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function\n"); | 36 error ("you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function\n"); |
37 endif | 37 endif |
38 pattern = "^[^\\s]*\\s*([0-9]+\\.[0-9]+)\\s*[^\\s]*\\s*([^\\s]*)"; | 38 pattern = "^[^\\s]*\\s*([0-9]+\\.[0-9]+)\\s*[^\\s]*\\s*([^\\s]*)"; |
39 [d1, d2, d3, d4, matches] = regexp (output, pattern); | 39 [d1, d2, d3, d4, matches] = regexp (output, pattern); |
40 if (iscell (matches) && numel (matches) > 0 && iscellstr (matches{1})) | 40 if (iscell (matches) && numel (matches) > 0 && iscellstr (matches{1})) |
41 __version__ = matches{1}{1}; | 41 if (numel (matches{1}) == 2) |
42 __version__ = sprintf ("%s.%s", matches{1}{:}); | |
43 else | |
44 __version__ = matches{1}{1}; | |
45 endif | |
42 endif | 46 endif |
43 endif | 47 endif |
44 | 48 |
45 version = __version__; | 49 version = __version__; |
46 | 50 |