Custom functions/constants

Graph allows you to define your own custom functions and constants, which you can use in other expressions in the program. You may want to use this to factor out frequently used constants and subexpressions to make it faster and easier to use these items. Use the FunctionCustom functions... menu item to show the dialog.

Entering functions

The function and constant names are entered in the first column. The name may contain any combination of letters, digits and underscore but it must always start with a letter. You may not use a name that is already assigned to a built-in function or variable.

Function arguments are entered after the name in brackets separated by comma, e.g. f(x,y,z) is a function named f taking three arguments named x, y and z. Like the function name, the argument names must start with a letter and only contain letters and digits.

The expressions you want to define are entered in the second column. The expressions can use the arguments specified in the first column and all built-in functions, other custom functions and constants, and even call themselves recursively. A comment can be written after a # symbol at the end of an expression.

Changing and removing functions

You can remove a function or constant by clearing the name and definition or selecting Remove row from the context menu. All elements using the deleted function or constant will fail when evaluated.

When you press OK or Apply in the shown dialog, all elements are updated to reflect any changes to the functions and constants.