title: Using Matlab to import another .m file
body: <p>I'm quite new to Matlab. I've defined a function inside a .m file, I want to use that function in that .m file inside another .m file, and I want to run the contents of that last .m file from the command window.</p>
  
  <p>How should I go about accomplishing this?</p>
  
  <p><strong>EDIT</strong>- for clarification, I have one function <code>a</code> inside <code>a.m</code>, and a script inside <code>b.m</code> that uses the function <code>a</code> inside <code>a.m</code>. I would like to run this script inside <code>b.m</code> from the command window, but am not sure how to do so. (as a side note, I can totally convert the script in <code>b.m</code> into a function if need be)</p>
  
  <p><strong>EDIT</strong>- right now I just need to know how to import/load a matlab file and that is it!!!</p>