MATLAB Function Reference
  Go to function:
    Search    Help Desk 
else    See Also

Conditionally execute statements

Syntax

Description

The else command is used to delineate an alternate block of statements.

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

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

See Also

break       Terminate execution of for or while loop

elseif      Conditionally execute statements

end         Terminate for, while, and if statements and indicate the last index

for         Repeat statements a specific number of times

if          Conditionally execute statements

return      Return to the invoking function

switch      Switch among several cases based on expression

while       Repeat statements an indefinite number of times



[ Previous | Help Desk | Next ]