Mercurial > octave-nkf
comparison scripts/signal/blackman.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 | 542891ebfcdb |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
13278:04edb15d7966 | 13279:984359717d71 |
---|---|
31 | 31 |
32 if (nargin != 1) | 32 if (nargin != 1) |
33 print_usage (); | 33 print_usage (); |
34 endif | 34 endif |
35 | 35 |
36 if (! (isscalar (m) && (m == round (m)) && (m > 0))) | 36 if (! (isscalar (m) && (m == fix (m)) && (m > 0))) |
37 error ("blackman: M has to be an integer > 0"); | 37 error ("blackman: M has to be an integer > 0"); |
38 endif | 38 endif |
39 | 39 |
40 if (m == 1) | 40 if (m == 1) |
41 c = 1; | 41 c = 1; |