title: MATLAB: determine dependencies from 'command line' excluding built in dependencies
body: <p>Is there a way to determine all the dependencies of an .m file and any of the dependencies of the files it calls using a command in a script (command-line)?</p>
  
  <p>There was a question like this before and it was really good because it suggested using the <code>depfun</code> function.  BUT the issue with this was that it is outputting the <a href="http://en.wikipedia.org/wiki/MATLAB" rel="nofollow noreferrer">MATLAB</a> related files that it depends on as well.</p>
  
  <p>EXAMPLE:
  testing.m</p>
  
  <pre><code>disp('TESTING!!');
  </code></pre>
  
  <p>The output of depfun('testing')</p>
  
  <pre><code>'C:\testing.m'
  'C:\MATLAB\R2008a\toolbox\matlab\datatypes\@opaque\char.m'
  'C:\MATLAB\R2008a\toolbox\matlab\datatypes\@opaque\double.m'
  'C:\MATLAB\R2008a\toolbox\matlab\datatypes\@opaque\toChar.m'
  'C:\MATLAB\R2008a\toolbox\matlab\elfun\log10.m'
  'C:\MATLAB\R2008a\toolbox\matlab\elmat\ans.m'
  </code></pre>
  
  <p>etc.</p>
  
  <p>The list is a little bit longer.</p>
  
  <p>The point here is that I was hoping there would be some similar function or a flag that would remove these unwanted dependencies.</p>