Napoleon Docstrings

Napoleon is a Sphinx extension that allows you to write docstrings in Google or NumPy style, which are more readable than traditional reStructuredText.

Overview

sphinxcontrib-matlabdomain works great with Napoleon to support cleaner docstring formats.

NumPy Style

function result = calculate(x, y)
% CALCULATE Perform a calculation
%
% Parameters
% ----------
% x : double
%     First input value
% y : double
%     Second input value
%
% Returns
% -------
% double
%     The calculated result

result = x + y;
end

Configuration

Enable Napoleon in your conf.py:

extensions = [
    'sphinxcontrib.matlab',
    'sphinx.ext.napoleon',  # Add this
]

# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = True

See Also

Note

This page is a placeholder. Full documentation coming soon.