You can terminate any function with an END statement but, in most
cases, this is optional. END statements are required only in M-files
that employ one or more nested functions. Within such an M-file,
every function (including primary, nested, private, and subfunctions)
must be terminated with an END statement. You can terminate any
function type with END, but doing so is not required unless the
M-file contains a nested function.