Constant conditional statements cc4m_logo_inline

IDSTAT-12
TitleDo not use conditions like if true and similar.
PriorityMandatory
Severity level3
DescriptionDo not use conditions that are always true or always false such as if true or elseif 0. MATLAB's Code Analyzer warns about some of these cases.
RationaleThese constructs may cause unreachable code or unintended behaviour.

Avoid:

if x > 0 || true
    disp(x)
end   

Instead use:

disp(x)