octave define local function code example Example: octave define local function Look into subfunctions: https://octave.org/doc/v4.4.0/Subfunctions.html