Constant definitions at top

IDSTAT-1
TitlePlace constant definitions at the top of the function.
PriorityRecommended
DescriptionConstant definitions shall be placed at the top of the function, after defining global/persistent variables. That way they can easily be found.
RationaleReadability

Avoid:

function testConstants(x)
y = 3 * x;
MAX_Z = 100;
z = min(y, MAX_Z);
end

Instead use:

function testConstants(x)
MAX_Z = 100;

y = 3 * x;
z = min(y, MAX_Z);
end