title: What is the Mathworks way to generate Matlab HTML documentation?
body: <p>I am working on shared Matlab code and we would like to share a generated documentation as searchable HTML documents within our local network.</p>
  
  <p>I know of the following methods to generate a documentation:</p>
  
  <ol>
  <li>Write a converter to C++-like files. This is done in in <a href="http://www.mathworks.com/matlabcentral/fileexchange/25925-using-doxygen-with-matlab" rel="noreferrer">Using Doxygen with Matlab</a> (Last updated 2011) and <a href="http://www.mathworks.com/matlabcentral/fileexchange/33826-mtoc++-doxygen-filter-for-matlab-and-tools" rel="noreferrer">mtoc++</a> (last updated 2013). The C++-like files are then parsed by Doxygen.</li>
  <li>Use Python's <a href="https://pypi.python.org/pypi/sphinxcontrib-matlabdomain" rel="noreferrer">sphinxcontrib-matlabdomain</a> to generate a HTML documentation.</li>
  <li>Use <a href="http://www.artefact.tk/software/matlab/m2html/" rel="noreferrer">m2html</a> which is also a third-party solution.</li>
  <li>Further options are listed in this Q&amp;As: <a href="https://stackoverflow.com/questions/4912829/matlab-documentation-function?rq=1">One</a>, <a href="https://stackoverflow.com/questions/7840964/how-can-one-generate-good-documentation-for-object-oriented-matlab-code">Two</a> and <a href="https://stackoverflow.com/questions/14986704/export-auto-generate-matlab-doc-to-html?rq=1">Three</a>.</li>
  </ol>
  
  <p>All possibilities are not supported by Mathworks. All possibilities need me to mention i.e. the parameters of a function myself. They do not analyze the code in the sense, Doxygen does it for i.e. Java:</p>
  
  <pre><code>//! an object representation of the advertisement package sent by the beacon
  private AdvertisementPackage advertisementPackage;
  </code></pre>
  
  <p>I heard of Matlab's <a href="http://www.mathworks.de/de/help/matlab/matlab_prog/publishing-matlab-code.html" rel="noreferrer">publish()</a> function, but I did never see it used in the aforementioned sense.</p>
  
  <p>Question: What is the Mathworks way to generate Matlab HTML documentation. Can the code itself be analyzed? Can I use the information provided to the Matlab Input Parser already? Please mention your personal preference in comments.</p>
  
  <p>Example:</p>
  
  <pre><code>%% Input parser
  p = inputParser;
  addRequired(p, 'x', @isnumeric);
  
  validationFcn = @(x) (isnumeric(x) &amp;&amp; isscalar(x));
  addRequired(p, 'fftSize', validationFcn);
  addRequired(p, 'fftShift', validationFcn);
  
  validationFcn = @(x) (isa(x, 'function_handle'));
  addRequired(p, 'analysisWindowHandle', validationFcn);
  
  parse(p, x, fftSize, fftShift, analysisWindowHandle);
  </code></pre>