]> gitweb.michael.orlitzky.com - octave.git/blobdiff - odd.m
Move several functions out of the homework1/src directory and into the top-level...
[octave.git] / odd.m
diff --git a/odd.m b/odd.m
new file mode 100644 (file)
index 0000000..b0bc626
--- /dev/null
+++ b/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