如何记录面向对象的MATLAB代码? [英] How to document object-oriented MATLAB code?

查看:151
本文介绍了如何记录面向对象的MATLAB代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用面向对象的MATLAB编写一个相当大的应用程序,这让我想到如何记录代码。如果这是C,我会用Doxygen。对于Java,我会使用JavaDoc。两者都有大致同意的标准,以便类和方法文档应该如何看,应该包含什么。



但是MATLAB代码怎么样?我在TMW自己的课程中看到的最多的是在课堂顶部的短句子或两个,我找不到任何专门用于记录大量MATLAB应用程序的主题。



那么你如何记录你的MATLAB类?任何特定的风格问题或附加工具?

解决方案

我意识到这个问题是陈旧的,但为了Google的利益:Matlab有一个内置的功能。您以某种风格(一个JavaDoc)编写您的意见,并通过帮助和文档功能获取。它可用于记录类,属性和方法。这是惊人的完成,但有点精彩。该文档在这里:



http://www.mathworks.com/help/matlab/creating-help.html


I'm writing a sizable application using object-oriented MATLAB, and this has gotten me thinking about how to document the code. If this was C, I would use Doxygen. For Java, I'd use JavaDoc. Both have mostly agreed-upon standards for how class and method documentation should look and what it should contain.

But what about MATLAB code? The most I've seen in TMW's own classes is a short sentence or two at the top of the class, and I can't find any topics devoted to documenting sizable MATLAB applications.

So how do you document your MATLAB classes? Any particular style issues or additional tools?

解决方案

I realize the question is stale, but for the benefit of Google: Matlab has a built-in feature for that. You write your comments in a certain style (a la JavaDoc) and they get picked up by the help and doc functions. It can be used to document classes, properties, and methods. It is surprisingly complete, yet a little finicky. The doc is here:

http://www.mathworks.com/help/matlab/creating-help.html

这篇关于如何记录面向对象的MATLAB代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆