-
Notifications
You must be signed in to change notification settings - Fork 8
/
docstring_template.m
42 lines (35 loc) · 1.84 KB
/
docstring_template.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function [output1,output2] = CFF_function_name(input1,input2,input3)
%CFF_FUNCTION_NAME One-line description
%
% See also CFF_OTHER_FUNCTION_NAME.
% Copyright 2017-20XX Alexandre Schimel
% Licensed under MIT. Details on https://github.com/alexschimel/CoFFee/
%CFF_FUNCTION_NAME One-line description of what the function performs
%
% Optional multiple lines of information giving more details about the
% function. The first line above (so-called H1 line) has no space before
% the function name and two spaces after. CFF_FUNCTION_NAME and other
% functions are written in upper-case throughout this docstring. One or
% multiple examples syntaxes follow. The docstring is completed by a "See
% also" section that allows help functions such as "help" or "doc" to
% automatically create hyperlinks. Separated from the docstring by a
% single empty line are the copyright and license information.
%
% [X,Y] = CFF_FUNCTION_NAME(A,B,C) returns the sum of A+B as X, and C as
% Y. The first sentence was a short description of what the command does,
% and can be followed by additional information. This first syntax shows
% the basic and default use. Note the input and output variables are also
% written in upper case.
%
% X = CFF_FUNCTION_NAME(A,B) returns the sum of A+B as X. This is an
% example of alternative syntax, showing non-default use.
%
% CFF_FUNCTION_NAME(...,'alsoAdd',D) returns the sum of A+B+D. This is
% another syntax to introduce optional or parameter inputs. Since the
% basic inputs and outputs have already been discussed, they can be
% ommitted, so the text focuses exclusively on what the option does
% compared to the basic syntax.
%
% See also CFF_FUNCTION_NAME_1, CFF_OTHER_FUNCTION_NAME_2.
% Copyright 2017-20XX Alexandre Schimel
% Licensed under MIT. Details on https://github.com/alexschimel/CoFFee/