Documentation Center

  • Trial Software
  • Product Updates

return

Return to invoking function

Syntax

return

Description

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

Examples

This determinant function uses return to handle the special case of an empty matrix:

function d = det(A)
%DET det(A) is the determinant of A.
if isempty(A)
    d = 1;
    return
else
    ...
end

See Also

| | | | | | | | |

Was this topic helpful?