Mercurial > hg > octave-lyh
diff scripts/plot/figure.m @ 13279:984359717d71
Use common code idiom for checking whether a double value is an integer.
* num2str.m, rotdim.m, get_first_help_sentence.m, ind2rgb.m,
commutation_matrix.m, figure.m, legend.m, polyfit.m, bartlett.m, blackman.m,
detrend.m, hamming.m, hanning.m, factorial.m, mode.m, skewness.m, statistics.m,
mcnemar_test.m: Use idiom 'x == fix (x)' to test for integerness.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 05 Oct 2011 13:10:10 -0700 |
parents | be7bfd59300a |
children | 09b157ab2672 |
line wrap: on
line diff
--- a/scripts/plot/figure.m +++ b/scripts/plot/figure.m @@ -41,7 +41,7 @@ f = tmp; varargin(1) = []; nargs--; - elseif (isnumeric (tmp) && tmp > 0 && round (tmp) == tmp) + elseif (isnumeric (tmp) && tmp > 0 && tmp == fix (tmp)) f = tmp; init_new_figure = true; varargin(1) = []; @@ -88,4 +88,4 @@ %! assert (isfigure (hf)); %! unwind_protect_cleanup %! close (hf); -%! end_unwind_protect \ No newline at end of file +%! end_unwind_protect