» Controls
-
while
By matlabtutorials on March 6, 2008 | No Comments
while Repeat statements an indefinite number of times. The general form of a while statement is: while expression statements END The statements are executed while the real part of the expression has all non-zero elements. The expression is usually the result of expr rop expr where rop is ==, <, ... -
return
By matlabtutorials on March 6, 2008 | No Comments
return Return to invoking function. return causes a return to the invoking function or to the keyboard. It also terminates the KEYBOARD mode. Normally functions return when the end of the function is reached. A return statement can be used to force an early return. Example 1 2 3 4 5 6 7 function d ... -
elseif
By matlabtutorials on March 6, 2008 | No Comments
elseif IF statement condition. elseif is used with IF. The statements after the elseif are executed if the expression is true and all the preceding IF and elseif expressions are false. An expression is considered true if the real part has all non-zero elements. elseif does not need a matching END, w... -
if
By matlabtutorials on March 6, 2008 | No Comments
if if statement condition. The general form of the if statement is if expression statements ELSEIF expression statements ELSE statements END The statements are executed if the real part of the expression has all non-zero elements. The ELSE and ELSEIF parts are optional. Zero or more ELSEIF parts ca... -
for
By matlabtutorials on March 6, 2008 | No Comments
for Repeat statements a specific number of times. The general form of a for statement is: for variable = expr, statement, …, statement END The columns of the expression are stored one at a time in the variable and then the following statements, up to the END, are executed. The expression is...

