]> gitweb.michael.orlitzky.com - octave.git/blobdiff - misc/odd.m
Move even/odd into the misc subdirectory.
[octave.git] / misc / odd.m
diff --git a/misc/odd.m b/misc/odd.m
new file mode 100644 (file)
index 0000000..b0bc626
--- /dev/null
@@ -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