else

Purpose

Conditionally execute statements.

Synopsis

if expression
    statements
else
    statements
end

Description

else is used to delineate an alternate block of statements.

if expression
    statements
else
    statements
end
The second set of statements is executed if the expression has any zero elements. The expression is usually the result of

expression rop expression
where rop is ==, <, >, <=, >=, or ~=.

See Also

elseif, if

(c) Copyright 1994 by The MathWorks, Inc.