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

Return to the invoking function

Syntax

Description

return causes a normal return to the invoking function or to the keyboard. It also terminates keyboard mode.

Examples

If the determinant function were an M-file, it might use a return statement in handling the special case of an empty matrix as follows:

See Also

break       Terminate execution of for or while loop

disp        Display text or array

end         Terminate for, while, switch, try, and if statements or indicate last index

error       Display error messages

for         Repeat statements a specific number of times

if          Conditionally execute statements

keyboard    Invoke the keyboard in an M-file

switch      Switch among several cases based on expression

while       Repeat statements an indefinite number of times



[ Previous | Help Desk | Next ]