11.6 Default Arguments

Since Octave supports variable number of input arguments, it is very useful
to assign default values to some input arguments. When an input argument
is declared in the argument list it is possible to assign a default
value to the argument like this

function name (arg1 = val1, …)
body
endfunction

If no value is assigned to arg1 by the user, it will have the
value val1.

As an example, the following function implements a variant of the classic
“Hello, World” program.