return
Programming
Return from the current function immediately. In a script context, terminates execution of the script.
Syntax
return
Examples
function y = safediv(a, b)
if b == 0
y = Inf;
return
end
y = a / b;
end▶ RunSee Also
Try SimLab — Free MATLAB® Alternative
466 functions. Runs in your browser. No install.
Open SimLab