MATLAB Function Reference | Search  Help Desk |
else | See Also |
Conditionally execute statements
ifTheexpression
statements
elsestatements
end
else
command is used to delineate an alternate block of statements.
ifThe second set ofexpression
statements
elsestatements
end
statements
is executed if the expression
has any zero elements. The expression is usually the result of
whereexpression rop
expression
rop
is ==
, <
, >
, <=
, >=
, or ~=
.
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