Mercurial > hg > octave-lyh
diff scripts/signal/detrend.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 | fd0a3ac60b0e |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/signal/detrend.m +++ b/scripts/signal/detrend.m @@ -45,7 +45,7 @@ p = 0; elseif (ischar (p) && strcmpi (p, "linear")) p = 1; - elseif (!isscalar (p) || p < 0 || p != round (p)) + elseif (!isscalar (p) || p < 0 || p != fix (p)) error ("detrend: second input argument must be 'constant', 'linear' or a positive integer"); endif else