The define command is used to specify user-defined vector functions.
define [function(arg1, arg2, ...)] [expression]This will define the user-definable function with the name function and arguments arg1, arg2, ... to be expression, which may involve the arguments. When the function is later used, the arguments that are is given are substituted for the formal arguments. If expression is not present, any definitions for function are printed, and if there are no arguments then all currently active definitions are printed. Note that one may have different functions defined with the same name but different arities. Some useful definitions (which are part of the default environment) are:
define max(x,y) (x > y) * x + (x <= y) * y
define min(x,y) (x < y) * x + (x >= y) * y