title: Creating Function in Octave
body: <p>I'm beginning with octave.  I've created a file called squareThisNumber.m in My Documents with the following code:</p>
  
  <pre><code>function y = squareThisNumber(x)
  y = x^2;
  </code></pre>
  
  <p>I set the directory to look at My Documents with</p>
  
  <pre><code>cd 'C:\Users\XXXX\My Documents'
  </code></pre>
  
  <p>I type "squareThisNumber(3)" into octave, and all I'm getting is "Error: 'squareThisNumber' undefined near line 3 column 1."  What am I doing wrong?</p>
  
  <p>EDIT:</p>
  
  <p>When I type ls into octave, I get "error: ls: command exited abnormally with status 127".  Did I not install Octave correctly?</p>