<< for interpreter functions if >>

function


endfunction


function declaration.


Syntax


function [out_1,...,out_M,varargout] = fname(in_1, ... , in_N, varargin)
function fname(in_1, ... , in_N, varargin)
function [out_1,...,out_M,varargout] = fname()
function fname()

Description


function opens a function definition.

endfunction closes a function definition (optional, but strongly recommended).

Example


in a file: demo_function.nlf

function r = demo_function(a, b)
  r = a + b;
endfunction

See also


addpath.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< for interpreter functions if >>