| MATLAB Functions | Help Desk |
else
Conditionally execute statements
ifTheexpressionstatementselsestatementsend
else command is used to delineate an alternate block of statements.
ifThe second set ofexpressionstatementselsestatementsend
statements is executed if the expression has any zero elements. The expression is usually the result of
whereexpression ropexpression
rop is ==, <, >, <=, >=, or ~=.
break Break out of flow control structures
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