![]() ![]() We keep our code in a Subversion repository and use the keywords functionality for writing this sort of information into the header comments of the m-file when it is committed to the repo. Since git uses hashes of files, you can't change the content of the file, without git thinking that it's been updated. $Author:, etc., are formatted for use with CSV/SVN. (I've just spotted a bug - the year should be before the company name in the copyright line. The Examples: and See also: lines are formatted in a way the works with the help report generator. If you have different use cases (maybe with and without optional arguments), then you should describe each one. It is important that this comes straight after the function definition line. ![]() ![]() The first line of the help documentation is known as the H1 line, and is used by the function lookfor, among others. (You'll obviously want a different company in your copyright statement.) % Copyright: Health and Safety Laboratory 2010 % = TESTFUNCTION(INPUTARGS) Explain usage here %TESTFUNCTION Summary of this function goes here The basic template for documentation that I use is function = TestFunction(inputArgs) You just type new at the command prompt, then the name of the function, and it sorts out the rest. I have a function in the MATLAB Central File Exchange that helps you document your function in a standard way, and works with version control software (CVS and Subversion not git) to automatically update the author field and time of modification. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |