You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用sphinxcontrib.matlab生成MATLAB工具箱文档失败求助

Sphinx 无法生成MATLAB函数文档问题

问题描述

我在慕尼黑工业大学(TUM)本科阶段开发一款MATLAB工具箱,希望借助Sphinx的自动文档功能生成文档。已使用sphinxcontrib.matlab扩展,Sphinx版本为5.0.0(符合该扩展≥4.0.0且<6.0.0的版本要求)。已在docs/source下的conf.py中配置了所需扩展及MATLAB源码路径,但生成的index.html仅包含index.rst中的内容,未显示crossedHotWireCalibration.m等MATLAB函数的注释(即类似MATLAB help命令输出的内容),且Sphinx未抛出任何报错。

项目目录结构

C:\Users\lelem\TUM\Semester\WS2223\BachelorThesisSVN\07_Software

├───CalibrationDataSets
│   └───Hiding Place
├───crossedHotWireCalibrationSubfunctions
├───docs
│   ├───build
│   │   ├───.doctrees
│   │   ├───_sources
│   │   └───_static
│   └───source
│       ├───_static
│       └───_templates
├───Preexisting Software
└───temp
crossedHotWireCalibration.m
  • crossedHotWireCalibration.m:工具箱主函数
  • crossedHotWireCalibrationSubfunctions:存放主函数调用的子函数
  • CalibrationDataSets:存放主函数生成的.mat格式结果数据

核心配置

conf.py 关键代码

extensions = ['sphinxcontrib.matlab', 'sphinx.ext.autodoc', 'sphinx.ext.graphviz']
matlab_src_dir = 'C:/Users/lelem/TUM/Semester/WS2223/BachelorThesisSVN/07_Software'

index.rst 内容

.. X Hot Wire Calibration documentation master file, created by
   sphinx-quickstart on Fri Mar 17 12:46:58 2023.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to X Hot Wire Calibration's documentation!
==================================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

内容的提问来源于stack exchange,提问作者L. Merbecks

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 17:25:23