Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Methods for organizing/showing algorithm that is coded in C or MATLAB

Is there any recommendations for how to show what your code is doing (C or MATLAB)? Imagine if your code is really long and you have a lot of functions in your program, what is the best way to document the program? I know Java IDEs have a way to ingest comments and spit them back out into a document that shows all the functions, and their inputs and outputs. I don't think C or MATLAB has this feature. At this point, I am thinking comments are the only way to show what is going on in the code, but it may confuse the reader if they have to look through the raw code along side the comments. The second option would be to write out the algorithm in a text editor such as Microsoft Word. Is there an industry standard for doing this?

Thanks!

like image 609
O_O Avatar asked Dec 28 '25 15:12

O_O


2 Answers

What Java uses is JavaDoc.

For C, you can use Doxygen.

I also saw this which suggests you can use Doxygen with matlab too!

like image 78
Shahbaz Avatar answered Dec 31 '25 06:12

Shahbaz


The mother of all literate programming is http://www-cs-faculty.stanford.edu/~uno/cweb.html cweb. The father is Knuth.

like image 44
wildplasser Avatar answered Dec 31 '25 07:12

wildplasser