2. Creating new functions

To keep the OpenEarth toolbox well organised, it is of crucial importance that all functions receive a proper help block (in Matlab this is the first uninterrupted comment block after the function declaration and/or before the first line of code.

To lower the threshold to add such a helpblock the oetnewfun routine was developed. It creates a new function using the input arguments supplied by the user or using default arguments.

Contents

Invoking a new function template

Function template layout