MATLAB Functions Help Desk

return

Purpose

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       Break out of flow control structures

disp        Display text or array

end         Terminate for, while, switch, 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 ]