title: How do I retrieve the names of function parameters in matlab?
body: <p>Aside from parsing the function file, is there a way to get the names of the input and output arguments to a function in matlab?</p>
  
  <p>For example, given the following function file:</p>
  
  <p><em>divide.m</em></p>
  
  <pre><code>function [value, remain] = divide(left, right)
       value = floor(left / right);
       remain = left / right - value;
  end
  </code></pre>
  
  <p>From outside the function, I want to get an array of output arguments, here: <code>['value', 'remain']</code>, and similarly for the input arguments: <code>['left', 'right']</code>.</p>
  
  <p>Is there an easy way to do this in matlab? Matlab usually seems to support reflection pretty well.</p>
  
  <p>EDIT Background:</p>
  
  <p>The aim of this is to present the function parameters in a window for the user to enter. I'm writing a kind of signal processing program, and functions to perform operations on these signals are stored in a subfolder. I already have a list and the names of each function from which the user can select, but some functions require additional arguments (e.g. a smooth function might take window size as a parameter).</p>
  
  <p>At the moment, I can add a new function to the subfolder which the program will find, and the user can select it to perform an operation. What I'm missing is for the user to specify the input and output parameters, and here I've hit the hurdle here in that I can't find the names of the functions. </p>