Function indentation 
ID | LAYOUT-2 |
Title | Do not indent functions on the root level of a file. |
Priority | Recommended |
Severity level | 10 |
Description | Only methods in a classdef file and nested functions shall be indented. This can be set as a preference in MATLAB. |
Rationale | Having one less level of indentation makes for shorter lines of code, improving readability. |
Avoid:
function computeWeight(in)
weight = 2 * in;
end
Instead use:
function computeWeight(in)
weight = 2 * in;
end