FUNCTION REFERENCE

else

Run statements when no earlier condition of an if was true.

Run statements when no earlier condition of an if was true.

Syntax

if condition, ..., else, ..., end

Used inside if, after the last elseif.

Example

x = 1; if x > 2, disp('big'), else, disp('small'), end   % prints: small

Differences from MATLAB: Not checked against MATLAB yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.