Programming Standards
Programs written in MATLAB must meet the following requirements:
Both graphical or other output and source code should be turned
in with each assignment.
Documentation of Source Code
-
All program units (main program, subroutines, functions) should begin with
a header describing
- the purpose of the program.
- the inputs and outputs of the program.
- the authors of the program.
- the date the program was last modified.
The MATLAB function euler.m is an example
of how a sample program should look like.
-
Sufficient comments should be provided within the body of the
source code that a reader can follow the structure of the computation.
-
Loops should be indented for readability.
Graphics
-
Captions should be provided which clearly identify the significance
of the plots.
-
Axes should be clearly labeled, with units if relevant.
-
Multiple lines on the same plot should be distinguished, eg. by
use of different line types with the significance of each explained
in the caption.