return
-
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 = det(A) if isempty(A) d = 1; return else ... end
See also function, keyboard.


