• Uncategorised

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

function d = det(A)
if isempty(A)
d = 1;
return
else
...
end

See also function, keyboard.

You may also like...