X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=misc%2Fodd.m;fp=misc%2Fodd.m;h=b0bc6267be4db4e29615e2d6915353a018b4e4c6;hp=0000000000000000000000000000000000000000;hb=be86b42e1f06a8dddb6dd50832307e7d776023df;hpb=b619f0c2d08f80974d7a63b8d7fb742799949c4b diff --git a/misc/odd.m b/misc/odd.m new file mode 100644 index 0000000..b0bc626 --- /dev/null +++ b/misc/odd.m @@ -0,0 +1,15 @@ +function odd = odd(integer_n) + ## Returns true if its argument is odd; false otherwise. + ## + ## INPUTS: + ## + ## * ``integer_n`` - The integer whose parity you're determining. + ## + ## + ## OUTPUTS: + ## + ## * ``odd`` - True if `integer_n` is odd, false otherwise. + ## + + odd = !even(integer_n); +end